summaryrefslogtreecommitdiffstats
path: root/clang/test/CodeGenCXX/debug-info.cpp
diff options
context:
space:
mode:
authorDavid Blaikie <dblaikie@gmail.com>2013-05-09 21:32:04 +0000
committerDavid Blaikie <dblaikie@gmail.com>2013-05-09 21:32:04 +0000
commit8039fdf48c83aa67f4c7de7f93177ccede42e9ad (patch)
tree4e206482d7ca1fcb2b6196a5d36c1c3c055a823a /clang/test/CodeGenCXX/debug-info.cpp
parent9bf66a5fd06f1880647c601fc5c5b3787ebd1202 (diff)
downloadbcm5719-llvm-8039fdf48c83aa67f4c7de7f93177ccede42e9ad.tar.gz
bcm5719-llvm-8039fdf48c83aa67f4c7de7f93177ccede42e9ad.zip
DebugInfo: Simply & constrain test(s) for PR9600/PR9608
Both these tests were ultimately fixed by the check for "isIncompleteType" & neither test case was really reduced to a minimal form. On doing so it becomes apparent that the problem wasn't specific to templates at all, so I've moved the test case to a more appropriate test file and added FileCheck verification to it (to show the forward declaration of the array element type as well as the array alignment and size being 0 since it cannot be computed). That's about as far down this rabbithole as I'm willing to go today, so the rest of the un-FileChecked tests in test/CodeGenCXX/debug-info.cpp will have to go another day without actually testing anything other than the fact that they don't crash. & improve the actually interesting test case in test/CodeGenCXX/debug-info-templates.cpp which was my original goal (in preparation for expanding it/fixing some related bugs in non-type template parameters) llvm-svn: 181552
Diffstat (limited to 'clang/test/CodeGenCXX/debug-info.cpp')
-rw-r--r--clang/test/CodeGenCXX/debug-info.cpp11
1 files changed, 10 insertions, 1 deletions
diff --git a/clang/test/CodeGenCXX/debug-info.cpp b/clang/test/CodeGenCXX/debug-info.cpp
index 33b52789caf..d691f97e598 100644
--- a/clang/test/CodeGenCXX/debug-info.cpp
+++ b/clang/test/CodeGenCXX/debug-info.cpp
@@ -1,4 +1,4 @@
-// RUN: %clang_cc1 -emit-llvm-only -g %s
+// RUN: %clang_cc1 -emit-llvm-only -g %s -o - | FileCheck %s
template<typename T> struct Identity {
typedef T Type;
};
@@ -67,3 +67,12 @@ class Cls {
Cls obj;
}
+
+namespace pr9608 { // also pr9600
+struct incomplete;
+incomplete (*x)[3];
+// CHECK: metadata [[INCARRAYPTR:![0-9]*]], i32 0, i32 1, [3 x i8]** @_ZN6pr96081xE, null} ; [ DW_TAG_variable ] [x]
+// CHECK: [[INCARRAYPTR]] = {{.*}}metadata [[INCARRAY:![0-9]*]]} ; [ DW_TAG_pointer_type ]
+// CHECK: [[INCARRAY]] = {{.*}}metadata [[INCTYPE:![0-9]*]], metadata {{![0-9]*}}, i32 0, i32 0} ; [ DW_TAG_array_type ] [line 0, size 0, align 0, offset 0] [from incomplete]
+// CHECK: [[INCTYPE]] = {{.*}} ; [ DW_TAG_structure_type ] [incomplete]{{.*}} [fwd]
+}
OpenPOWER on IntegriCloud