summaryrefslogtreecommitdiffstats
path: root/clang/test/CodeGenCXX
diff options
context:
space:
mode:
authorEric Christopher <echristo@apple.com>2011-12-16 23:40:14 +0000
committerEric Christopher <echristo@apple.com>2011-12-16 23:40:14 +0000
commitea225fb41269eb0a8c6bcb1f7778d23a8881c526 (patch)
tree48ee37a931d433d02f8909c2325a062246d49e23 /clang/test/CodeGenCXX
parentf7f36dc694c8b6ac34936ea14231c52ca8d36588 (diff)
downloadbcm5719-llvm-ea225fb41269eb0a8c6bcb1f7778d23a8881c526.tar.gz
bcm5719-llvm-ea225fb41269eb0a8c6bcb1f7778d23a8881c526.zip
Start down the path of getting clang to internally agree on structs versus
classes. Part of rdar://10520586 and a couple others. llvm-svn: 146778
Diffstat (limited to 'clang/test/CodeGenCXX')
-rw-r--r--clang/test/CodeGenCXX/debug-info-fwd-ref.cpp23
1 files changed, 23 insertions, 0 deletions
diff --git a/clang/test/CodeGenCXX/debug-info-fwd-ref.cpp b/clang/test/CodeGenCXX/debug-info-fwd-ref.cpp
new file mode 100644
index 00000000000..e01733c7777
--- /dev/null
+++ b/clang/test/CodeGenCXX/debug-info-fwd-ref.cpp
@@ -0,0 +1,23 @@
+// RUN: %clang_cc1 -emit-llvm -g %s -o - | FileCheck %s
+
+struct baz {
+ int h;
+ baz(int a) : h(a) {}
+};
+
+struct bar {
+ baz b;
+ baz& b_ref;
+ bar(int x) : b(x), b_ref(b) {}
+};
+
+int main(int argc, char** argv) {
+ bar myBar(1);
+ return 0;
+}
+
+// Make sure we have two DW_TAG_class_types for baz and bar for their forward
+// references.
+// FIXME: These should be struct types to match the declaration.
+// CHECK: !17 = metadata !{i32 720898, null, metadata !"baz", metadata !6, i32 3, i64 0, i64 0, i32 0, i32 4, null, null, i32 0, null, null} ; [ DW_TAG_class_type ]
+// CHECK: !26 = metadata !{i32 720898, null, metadata !"bar", metadata !6, i32 8, i64 0, i64 0, i32 0, i32 4, null, null, i32 0, null, null} ; [ DW_TAG_class_type ]
OpenPOWER on IntegriCloud