File tree Expand file tree Collapse file tree 1 file changed +29
-0
lines changed Expand file tree Collapse file tree 1 file changed +29
-0
lines changed Original file line number Diff line number Diff line change 1+ // Tests that we emit don't emit unified constructor/destructor linkage names
2+ // 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=CHECK
7+ //
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=CHECK
11+
12+ struct HasNestedCtor {
13+ HasNestedCtor ();
14+ };
15+
16+ HasNestedCtor::HasNestedCtor () {
17+ struct Local {
18+ Local () {}
19+ ~Local () {}
20+ } l;
21+ }
22+
23+ // CHECK: !DISubprogram(name: "Local"
24+ // CHECK-NOT: linkageName
25+ // CHECK-SAME: )
26+
27+ // CHECK: !DISubprogram(name: "~Local"
28+ // CHECK-NOT: linkageName
29+ // CHECK-SAME: )
You can’t perform that action at this time.
0 commit comments