diff options
Diffstat (limited to 'test/Transforms/GlobalDCE/global_ctors.ll')
-rw-r--r-- | test/Transforms/GlobalDCE/global_ctors.ll | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/test/Transforms/GlobalDCE/global_ctors.ll b/test/Transforms/GlobalDCE/global_ctors.ll new file mode 100644 index 0000000..91bb9ab --- /dev/null +++ b/test/Transforms/GlobalDCE/global_ctors.ll @@ -0,0 +1,14 @@ +; RUN: opt -S -globaldce < %s | FileCheck %s + +; CHECK: @llvm.global_ctors = appending global [1 x { i32, void ()* }] [{ i32, void ()* } { i32 65535, void ()* @_notremovable }] +; CHECK-NOT: @_GLOBAL__I_a + +declare void @_notremovable() + +@llvm.global_ctors = appending global [2 x { i32, void ()* }] [{ i32, void ()* } { i32 65535, void ()* @_GLOBAL__I_a }, { i32, void ()* } { i32 65535, void ()* @_notremovable }] + +; Function Attrs: nounwind readnone +define internal void @_GLOBAL__I_a() #1 section "__TEXT,__StaticInit,regular,pure_instructions" { +entry: + ret void +} |