30 lines · cpp
1// Tests that we emit don't emit unified constructor/destructor linkage names2// for function-local constructors.3 4// Check with -gstructor-decl-linkage-names.5// RUN: %clang_cc1 -triple aarch64-apple-macosx -emit-llvm -debug-info-kind=standalone \6// RUN: -gstructor-decl-linkage-names %s -o - | FileCheck %s --check-prefixes=CHECK7//8// Check with -gno-structor-decl-linkage-names.9// RUN: %clang_cc1 -triple aarch64-apple-macosx -emit-llvm -debug-info-kind=standalone \10// RUN: -gno-structor-decl-linkage-names %s -o - | FileCheck %s --check-prefixes=CHECK11 12struct HasNestedCtor {13 HasNestedCtor();14};15 16HasNestedCtor::HasNestedCtor() {17 struct Local {18 Local() {}19 ~Local() {}20 } l;21}22 23// CHECK: !DISubprogram(name: "Local"24// CHECK-NOT: linkageName25// CHECK-SAME: )26 27// CHECK: !DISubprogram(name: "~Local"28// CHECK-NOT: linkageName29// CHECK-SAME: )30