Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(152)

Side by Side Diff: test/Transforms/NaCl/expand-ctors.ll

Issue 939073008: Rebased PNaCl localmods in LLVM to 223109 (Closed)
Patch Set: undo localmod Created 5 years, 10 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « test/Transforms/NaCl/expand-constantexpr.ll ('k') | test/Transforms/NaCl/expand-ctors-empty.ll » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
(Empty)
1 ; We expect these symbol names to be removed:
2 ; RUN: opt < %s -nacl-expand-ctors -S | FileCheck %s -check-prefix=NO_CTORS
3 ; NO_CTORS-NOT: llvm.global.ctors
4 ; NO_CTORS-NOT: __init_array_end
5 ; NO_CTORS-NOT: __fini_array_end
6
7 ; RUN: opt < %s -nacl-expand-ctors -S | FileCheck %s
8
9 @llvm.global_ctors = appending global [3 x { i32, void ()* }]
10 [{ i32, void ()* } { i32 300, void ()* @init_func_A },
11 { i32, void ()* } { i32 100, void ()* @init_func_B },
12 { i32, void ()* } { i32 200, void ()* @init_func_C }]
13
14 @__init_array_start = extern_weak global [0 x void ()*]
15 @__init_array_end = extern_weak global [0 x void ()*]
16
17 ; CHECK: @__init_array_start = internal constant [3 x void ()*] [void ()* @init_ func_B, void ()* @init_func_C, void ()* @init_func_A]
18 ; CHECK: @__fini_array_start = internal constant [0 x void ()*] zeroinitializer
19
20 define void @init_func_A() { ret void }
21 define void @init_func_B() { ret void }
22 define void @init_func_C() { ret void }
23
24 define [0 x void ()*]* @get_array_start() {
25 ret [0 x void ()*]* @__init_array_start;
26 }
27 ; CHECK: @get_array_start()
28 ; CHECK: ret {{.*}} @__init_array_start
29
30 define [0 x void ()*]* @get_array_end() {
31 ret [0 x void ()*]* @__init_array_end;
32 }
33
34 ; @get_array_end() is converted to use a GetElementPtr that returns
35 ; the end of the generated array:
36 ; CHECK: @get_array_end()
37 ; CHECK: ret {{.*}} bitcast ([3 x void ()*]* getelementptr inbounds ([3 x void ( )*]* @__init_array_start, i32 1)
OLDNEW
« no previous file with comments | « test/Transforms/NaCl/expand-constantexpr.ll ('k') | test/Transforms/NaCl/expand-ctors-empty.ll » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698