]> granicus.if.org Git - clang/commitdiff
Enhance debug info namespace test to check for context/scope reference
authorDavid Blaikie <dblaikie@gmail.com>
Wed, 20 Mar 2013 19:10:57 +0000 (19:10 +0000)
committerDavid Blaikie <dblaikie@gmail.com>
Wed, 20 Mar 2013 19:10:57 +0000 (19:10 +0000)
The #line directive is mostly for backend testing (keeping these files matching
should simplify maintenance somewhat) though the corresponding backend test
improvement/update doesn't verify the file information directly just yet.
Coming in a later iteration.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@177559 91177308-0d34-0410-b5e6-96231b3b80d8

test/CodeGenCXX/debug-info-namespace.cpp

index b29f2703f3ad53afe9cfab198cb76877402a462a..ccc0d1818d314e63906448ba8710e5b364a65aec 100644 (file)
@@ -1,9 +1,14 @@
 // RUN: %clang  -g -S -emit-llvm %s -o - | FileCheck %s
 
 namespace A {
+#line 1 "foo.cpp"
+namespace B {
 int i;
 }
+}
 
 // CHECK: [[FILE:![0-9]*]] = {{.*}} ; [ DW_TAG_file_type ] [{{.*}}/test/CodeGenCXX/debug-info-namespace.cpp]
 // CHECK: [[VAR:![0-9]*]] = {{.*}}, metadata [[NS:![0-9]*]], metadata !"i", {{.*}} ; [ DW_TAG_variable ] [i]
-// CHECK: [[NS]] = {{.*}}, metadata [[FILE]], {{.*}} ; [ DW_TAG_namespace ] [A] [line 3]
+// CHECK: [[NS]] = {{.*}}, metadata [[FILE2:![0-9]*]], metadata [[CTXT:![0-9]*]], {{.*}} ; [ DW_TAG_namespace ] [B] [line 1]
+// CHECK: [[FILE2:![0-9]*]] = {{.*}} ; [ DW_TAG_file_type ] [{{.*}}foo.cpp]
+// CHECK: [[CTXT]] = {{.*}}, metadata [[FILE]], null, {{.*}} ; [ DW_TAG_namespace ] [A] [line 3]