brintos

brintos / llvm-project-archived public Read only

0
0
Text · 789 B · cca5eaf Raw
24 lines · cpp
1// RUN: %clang_cc1 -triple x86_64-unknown-linux-gnu -emit-llvm -fexceptions %s -o - | FileCheck %s --check-prefixes CHECK,CHECK-DEFAULT2// RUN: %clang_cc1 -triple x86_64-unknown-linux-gnu -emit-llvm -fexceptions %s -o - -DHIDDEN | FileCheck %s --check-prefixes CHECK,CHECK-HIDDEN3 4class A {5public:6  ~A();7} a;8 9// CHECK-DEFAULT: @__dso_handle = global ptr @__dso_handle, align 810// CHECK-HIDDEN: @__dso_handle = hidden global ptr @__dso_handle, align 811// CHECK: define internal void @__cxx_global_var_init()12// CHECK:   call i32 @__cxa_atexit({{.*}}, {{.*}}, ptr @__dso_handle)13 14#ifdef HIDDEN15void *__dso_handle __attribute__((__visibility__("hidden"))) = &__dso_handle;16#else17void *__dso_handle = &__dso_handle;18#endif19 20void use(void *);21void use_dso_handle() {22  use(__dso_handle);23}24