brintos

brintos / llvm-project-archived public Read only

0
0
Text · 727 B · f0500ca Raw
24 lines · cpp
1// RUN: %clang_cc1 -triple %itanium_abi_triple -emit-llvm -o - %s | FileCheck %s2 3// CHECK: @llvm.global_dtors4// CHECK-SAME: i32 65535, ptr @_ZN3Foo3fooEv5// CHECK-SAME: i32 101, ptr @_Z22template_dependent_cxxILi101EEvv6// CHECK-SAME: i32 104, ptr @_Z23template_dependent_nttpIiLi104EEvv7 8// PR65219void bar();10struct Foo {11  // CHECK-LABEL: define linkonce_odr {{.*}}void @_ZN3Foo3fooEv12  static void foo() __attribute__((destructor)) {13    bar();14  }15};16 17template <int P>18[[gnu::destructor(P)]] void template_dependent_cxx() {}19template <typename T, int P = sizeof(T) * 26>20[[gnu::destructor(P)]] void template_dependent_nttp() {}21 22template void template_dependent_cxx<101>();23template void template_dependent_nttp<int>();24