Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[DebugInfo] Change to constructor homing debug info mode: skip litera…
…l types Summary: In constructor type homing mode sometimes complete debug info for constexpr types was missing, because there was not a constructor emitted. This change makes constructor type homing ignore constexpr types. Reviewers: rnk, dblaikie Subscribers: aprantl, cfe-commits Tags: #clang Differential Revision: https://reviews.llvm.org/D77432
- Loading branch information
Showing
2 changed files
with
16 additions
and
21 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,30 +1,26 @@ | ||
// RUN: %clang -cc1 -debug-info-kind=constructor -emit-llvm %s -o - | FileCheck %s | ||
|
||
// CHECK: !DICompositeType(tag: DW_TAG_structure_type, name: "A" | ||
// CHECK-NOT: DIFlagFwdDecl | ||
// CHECK-SAME: ){{$}} | ||
struct A {}; | ||
void TestA() { A a; } | ||
// CHECK-DAG: !DICompositeType(tag: DW_TAG_structure_type, name: "A"{{.*}}DIFlagTypePassByValue | ||
struct A { | ||
} TestA; | ||
|
||
// CHECK: !DICompositeType(tag: DW_TAG_structure_type, name: "B" | ||
// CHECK-SAME: flags: DIFlagFwdDecl | ||
// CHECK-DAG: !DICompositeType(tag: DW_TAG_structure_type, name: "B"{{.*}}flags: DIFlagFwdDecl | ||
struct B { | ||
B(); | ||
}; | ||
void TestB() { B b; } | ||
} TestB; | ||
|
||
// CHECK: !DICompositeType(tag: DW_TAG_structure_type, name: "C" | ||
// CHECK-NOT: flags: DIFlagFwdDecl | ||
// CHECK-SAME: ){{$}} | ||
// CHECK-DAG: !DICompositeType(tag: DW_TAG_structure_type, name: "C"{{.*}}DIFlagTypePassByValue | ||
struct C { | ||
C() {} | ||
}; | ||
void TestC() { C c; } | ||
} TestC; | ||
|
||
// CHECK: !DICompositeType(tag: DW_TAG_structure_type, name: "D" | ||
// CHECK-NOT: flags: DIFlagFwdDecl | ||
// CHECK-SAME: ){{$}} | ||
// CHECK-DAG: !DICompositeType(tag: DW_TAG_structure_type, name: "D"{{.*}}DIFlagTypePassByValue | ||
struct D { | ||
D(); | ||
}; | ||
D::D() {} | ||
|
||
// CHECK-DAG: !DICompositeType(tag: DW_TAG_structure_type, name: "E"{{.*}}DIFlagTypePassByValue | ||
struct E { | ||
constexpr E(){}; | ||
} TestE; |