summaryrefslogtreecommitdiffstats
path: root/test/CodeGenCXX/vtable-holder-self-reference.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'test/CodeGenCXX/vtable-holder-self-reference.cpp')
-rw-r--r--test/CodeGenCXX/vtable-holder-self-reference.cpp15
1 files changed, 15 insertions, 0 deletions
diff --git a/test/CodeGenCXX/vtable-holder-self-reference.cpp b/test/CodeGenCXX/vtable-holder-self-reference.cpp
new file mode 100644
index 0000000..05e6d71
--- /dev/null
+++ b/test/CodeGenCXX/vtable-holder-self-reference.cpp
@@ -0,0 +1,15 @@
+// RUN: %clang_cc1 -emit-llvm -gdwarf-2 -x c++ -o - %s | FileCheck %s
+//
+// PR21941: crasher for self-referencing DW_TAG_structure_type node. If we get
+// rid of self-referenceing structure_types (PR21902), then it should be safe
+// to just kill this test.
+//
+// CHECK: ![[SELF:[0-9]+]] = distinct !{!"0x13\00B\00{{[^"]*}}", {{[^,]+}}, {{[^,]+}}, {{[^,]+}}, {{[^,]+}}, ![[SELF]], {{[^}]+}}} ; [ DW_TAG_structure_type ] [B]
+
+void foo() {
+ struct V {
+ int vi;
+ };
+ struct B : virtual V {};
+ B b;
+}
OpenPOWER on IntegriCloud