Debian Codegraph @

clang/test/CodeGenCXX/destructor-attr.cpp

raw
1 // RUN: %clang_cc1 -triple %itanium_abi_triple -emit-llvm -o - %s | FileCheck %s
2
3 // CHECK: @llvm.global_dtors
4 // CHECK-SAME: i32 65535, ptr @_ZN3Foo3fooEv
5 // CHECK-SAME: i32 101, ptr @_Z22template_dependent_cxxILi101EEvv
6 // CHECK-SAME: i32 104, ptr @_Z23template_dependent_nttpIiLi104EEvv
7
8 // PR6521
9 void bar();
10 struct Foo {
11 // CHECK-LABEL: define linkonce_odr {{.*}}void @_ZN3Foo3fooEv
12 static void foo() __attribute__((destructor)) {
13 bar();
14 }
15 };
16
17 template <int P>
18 [[gnu::destructor(P)]] void template_dependent_cxx() {}
19 template <typename T, int P = sizeof(T) * 26>
20 [[gnu::destructor(P)]] void template_dependent_nttp() {}
21
22 template void template_dependent_cxx<101>();
23 template void template_dependent_nttp<int>();