1 ; RUN: opt -passes=lower-global-dtors -S < %s | FileCheck %s --implicit-check-not=llvm.global_dtors
3 ; Test that @llvm.global_dtors is completely removed if __cxa_atexit
4 ; is a no-op (i.e. doesn't use its first argument).
6 declare void @orig_dtor()
8 define i32 @__cxa_atexit(ptr, ptr, ptr) {
12 @llvm.global_dtors = appending global [1 x { i32, ptr, ptr }] [
13 { i32, ptr, ptr } { i32 0, ptr @orig_dtor, ptr null }
16 ; CHECK-NOT: @llvm.global_dtors
17 ; CHECK-NOT: call void @orig_dtor()