global_ctors.ll 568 B

1234567891011121314
  1. ; RUN: opt -S -globaldce < %s | FileCheck %s
  2. ; CHECK: @llvm.global_ctors = appending global [1 x { i32, void ()* }] [{ i32, void ()* } { i32 65535, void ()* @_notremovable }]
  3. ; CHECK-NOT: @_GLOBAL__I_a
  4. declare void @_notremovable()
  5. @llvm.global_ctors = appending global [2 x { i32, void ()* }] [{ i32, void ()* } { i32 65535, void ()* @_GLOBAL__I_a }, { i32, void ()* } { i32 65535, void ()* @_notremovable }]
  6. ; Function Attrs: nounwind readnone
  7. define internal void @_GLOBAL__I_a() #1 section "__TEXT,__StaticInit,regular,pure_instructions" {
  8. entry:
  9. ret void
  10. }