summaryrefslogtreecommitdiff
path: root/test/CodeGen/2009-01-21-invalid-debug-info.m
diff options
context:
space:
mode:
authorDaniel Dunbar <daniel@zuster.org>2009-01-22 00:09:25 +0000
committerDaniel Dunbar <daniel@zuster.org>2009-01-22 00:09:25 +0000
commit831570cc6f01ce04bb8e1d3a03944e5d864e5cdd (patch)
tree17be9a4bda6c468e9f20101d43811fa3b0ef4a33 /test/CodeGen/2009-01-21-invalid-debug-info.m
parent56210f780b3d7e6533b3dd968ad9ba007cdbe7b4 (diff)
downloadclang-831570cc6f01ce04bb8e1d3a03944e5d864e5cdd.tar.gz
Allow creation of "dummy" compile units for debug information.
- Although gross, this is needed currently to ensure that we produce well formed debug information (to match pace with the assertions being added to DebugInfo in LLVM). git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@62734 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'test/CodeGen/2009-01-21-invalid-debug-info.m')
-rw-r--r--test/CodeGen/2009-01-21-invalid-debug-info.m16
1 files changed, 16 insertions, 0 deletions
diff --git a/test/CodeGen/2009-01-21-invalid-debug-info.m b/test/CodeGen/2009-01-21-invalid-debug-info.m
new file mode 100644
index 0000000000..509a6fb4ed
--- /dev/null
+++ b/test/CodeGen/2009-01-21-invalid-debug-info.m
@@ -0,0 +1,16 @@
+// RUN: clang -S -g -o %t.s %s
+
+// FIXME: This test case can be removed at some point (since it will
+// no longer effectively test anything). The reason it was causing
+// trouble was the synthesized self decl in im1 was causing the debug
+// info for I1* to be generated, but referring to an invalid compile
+// unit. This was later referred to by f1 and created ill formed debug
+// information.
+
+@interface I1 @end
+
+@implementation I1
+-im0 {}
+@end
+
+I1 *f1(void) { return 0; }