summaryrefslogtreecommitdiffstats
path: root/clang/test/CodeGenCXX/debug-info-class.cpp
diff options
context:
space:
mode:
authorDavid Blaikie <dblaikie@gmail.com>2019-04-25 20:05:47 +0000
committerDavid Blaikie <dblaikie@gmail.com>2019-04-25 20:05:47 +0000
commitf0d66559ea345db4b2116cae044aaf3399d7e829 (patch)
tree7c7ad761257af5023d0de8af9608872faf084618 /clang/test/CodeGenCXX/debug-info-class.cpp
parent3775794812e582769e2ed1b53c00650a6b21387c (diff)
downloadbcm5719-llvm-f0d66559ea345db4b2116cae044aaf3399d7e829.tar.gz
bcm5719-llvm-f0d66559ea345db4b2116cae044aaf3399d7e829.zip
Skip type units/type uniquing when we know we're only emitting the type once (vtable-based emission when triggered by a strong vtable, with -fno-standalone-debug)
(this would regress size without a corresponding LLVM change that avoids putting other user defined types inside type units when they aren't in their own type units - instead emitting declarations inside the type unit and a definition in the primary CU) Reviewers: aprantl Differential Revision: https://reviews.llvm.org/D61079 llvm-svn: 359235
Diffstat (limited to 'clang/test/CodeGenCXX/debug-info-class.cpp')
-rw-r--r--clang/test/CodeGenCXX/debug-info-class.cpp30
1 files changed, 23 insertions, 7 deletions
diff --git a/clang/test/CodeGenCXX/debug-info-class.cpp b/clang/test/CodeGenCXX/debug-info-class.cpp
index 747b377ffb2..b3e79c37923 100644
--- a/clang/test/CodeGenCXX/debug-info-class.cpp
+++ b/clang/test/CodeGenCXX/debug-info-class.cpp
@@ -57,6 +57,11 @@ struct I : virtual H {};
struct J : I {};
J j;
+struct K {
+ virtual void func() {
+ }
+};
+
struct A {
int one;
static const int HdrSize = 52;
@@ -72,6 +77,8 @@ void f1() {
E y;
int i = F::i;
F::inner z;
+ K k;
+ k.func();
}
int main(int argc, char **argv) {
@@ -98,7 +105,8 @@ int main(int argc, char **argv) {
// CHECK: [[F:![0-9]*]] = !DICompositeType(tag: DW_TAG_structure_type, name: "F"
// CHECK-SAME: DIFlagFwdDecl
-// CHECK-SAME: identifier: "_ZTS1F"
+// CHECK-NOT: identifier:
+// CHECK-SAME: ){{$}}
// CHECK: !DICompositeType(tag: DW_TAG_structure_type, name: "I"
// CHECK-NOT: DIFlagFwdDecl
// CHECK-SAME: ){{$}}
@@ -117,7 +125,8 @@ int main(int argc, char **argv) {
// CHECK-NOT: DIFlagFwdDecl
// CHECK-SAME: elements: [[C_MEM:![0-9]*]]
// CHECK-SAME: vtableHolder: [[C]]
-// CHECK-SAME: identifier: "_ZTS1C"
+// CHECK-NOT: identifier:
+// CHECK-SAME: ){{$}}
// CHECK: [[C_MEM]] = !{[[C_VPTR:![0-9]*]], [[C_S:![0-9]*]], [[C_DTOR:![0-9]*]]}
// CHECK: [[C_VPTR]] = !DIDerivedType(tag: DW_TAG_member, name: "_vptr$C"
// CHECK-SAME: DIFlagArtificial
@@ -129,10 +138,16 @@ int main(int argc, char **argv) {
// CHECK: [[D:![0-9]+]] = !DICompositeType(tag: DW_TAG_structure_type, name: "D"
// CHECK-NOT: size:
// CHECK-SAME: DIFlagFwdDecl
-// CHECK-SAME: identifier: "_ZTS1D"
+// CHECK-NOT: identifier:
+// CHECK-SAME: ){{$}}
// CHECK: !DICompositeType(tag: DW_TAG_structure_type, name: "E"
// CHECK-SAME: DIFlagFwdDecl
-// CHECK-SAME: identifier: "_ZTS1E"
+// CHECK-NOT: identifier:
+// CHECK-SAME: ){{$}}
+
+// CHECK: !DICompositeType(tag: DW_TAG_structure_type, name: "K"
+// CHECK-SAME: identifier: "_ZTS1K"
+// CHECK-SAME: ){{$}}
// CHECK: !DISubprogram(name: "func",{{.*}} scope: [[D]]
// CHECK-SAME: DISPFlagDefinition
@@ -146,7 +161,8 @@ int main(int argc, char **argv) {
// CHECK: !DICompositeType(tag: DW_TAG_structure_type, name: "G"
// CHECK-SAME: DIFlagFwdDecl
-// CHECK-SAME: identifier: "_ZTS1G"
+// CHECK-NOT: identifier:
+// CHECK-SAME: ){{$}}
// CHECK: [[G_INNER_MEM]] = !{[[G_INNER_I:![0-9]*]]}
// CHECK: [[G_INNER_I]] = !DIDerivedType(tag: DW_TAG_member, name: "j"
// CHECK-SAME: baseType: ![[INT]]
@@ -154,5 +170,5 @@ int main(int argc, char **argv) {
// CHECK: !DICompositeType(tag: DW_TAG_structure_type, name: "A"
// CHECK: !DIDerivedType(tag: DW_TAG_member, name: "HdrSize"
//
-// CHECK: ![[EXCEPTLOC]] = !DILocation(line: 84,
-// CHECK: ![[RETLOC]] = !DILocation(line: 83,
+// CHECK: ![[EXCEPTLOC]] = !DILocation(line: 91,
+// CHECK: ![[RETLOC]] = !DILocation(line: 90,
OpenPOWER on IntegriCloud