xref: /llvm-project/clang/test/CodeGenCXX/constructor-attr.cpp (revision ea3e51d73f01de908030e9dc5c7654cc657a19cc)
1c9bd88e6SHans Wennborg // RUN: %clang_cc1 -triple %itanium_abi_triple -emit-llvm -o - %s | FileCheck %s
2d66828daSDouglas Gregor 
3d66828daSDouglas Gregor // CHECK: @llvm.global_ctors
4d66828daSDouglas Gregor 
5d66828daSDouglas Gregor // PR6521
6d66828daSDouglas Gregor void bar();
7d66828daSDouglas Gregor struct Foo {
8*ea3e51d7SDavid Blaikie   // CHECK-LABEL: define linkonce_odr {{.*}}void @_ZN3Foo3fooEv
fooFoo9d66828daSDouglas Gregor   static void foo() __attribute__((constructor)) {
10d66828daSDouglas Gregor     bar();
11d66828daSDouglas Gregor   }
12d66828daSDouglas Gregor };
13