OLD | NEW |
1 ; We expect these symbol names to be removed: | 1 ; We expect these symbol names to be removed: |
2 ; RUN: opt < %s -nacl-expand-ctors -S | FileCheck %s -check-prefix=NO_CTORS | 2 ; RUN: opt < %s -nacl-expand-ctors -S | FileCheck %s -check-prefix=NO_CTORS |
3 ; NO_CTORS-NOT: llvm.global.ctors | 3 ; NO_CTORS-NOT: llvm.global.ctors |
4 ; NO_CTORS-NOT: __init_array_end | 4 ; NO_CTORS-NOT: __init_array_end |
5 ; NO_CTORS-NOT: __fini_array_end | 5 ; NO_CTORS-NOT: __fini_array_end |
6 | 6 |
7 ; RUN: opt < %s -nacl-expand-ctors -S | FileCheck %s | 7 ; RUN: opt < %s -nacl-expand-ctors -S | FileCheck %s |
8 | 8 |
9 @llvm.global_ctors = appending global [3 x { i32, void ()* }] | 9 @llvm.global_ctors = appending global [3 x { i32, void ()* }] |
10 [{ i32, void ()* } { i32 300, void ()* @init_func_A }, | 10 [{ i32, void ()* } { i32 300, void ()* @init_func_A }, |
(...skipping 16 matching lines...) Expand all Loading... |
27 ; CHECK: @get_array_start() | 27 ; CHECK: @get_array_start() |
28 ; CHECK: ret {{.*}} @__init_array_start | 28 ; CHECK: ret {{.*}} @__init_array_start |
29 | 29 |
30 define [0 x void ()*]* @get_array_end() { | 30 define [0 x void ()*]* @get_array_end() { |
31 ret [0 x void ()*]* @__init_array_end; | 31 ret [0 x void ()*]* @__init_array_end; |
32 } | 32 } |
33 | 33 |
34 ; @get_array_end() is converted to use a GetElementPtr that returns | 34 ; @get_array_end() is converted to use a GetElementPtr that returns |
35 ; the end of the generated array: | 35 ; the end of the generated array: |
36 ; CHECK: @get_array_end() | 36 ; CHECK: @get_array_end() |
37 ; CHECK: ret {{.*}} bitcast ([3 x void ()*]* getelementptr inbounds ([3 x void (
)*]* @__init_array_start, i32 1) | 37 ; CHECK: ret {{.*}} bitcast ([3 x void ()*]* getelementptr inbounds ([3 x void (
)*], [3 x void ()*]* @__init_array_start, i32 1) |
OLD | NEW |