summaryrefslogtreecommitdiffstats
path: root/clang/test/CodeGenCXX/debug-info-namespace.cpp
diff options
context:
space:
mode:
authorDavid Blaikie <dblaikie@gmail.com>2013-03-20 19:10:57 +0000
committerDavid Blaikie <dblaikie@gmail.com>2013-03-20 19:10:57 +0000
commit9e38bde14d61a73e5c8b5823b0257d5254a72689 (patch)
treec22eb45daadad5d09577ad76cbfec94f49d8ffff /clang/test/CodeGenCXX/debug-info-namespace.cpp
parentbdbda93f35167175b82e2a8897fefb841331bd81 (diff)
downloadbcm5719-llvm-9e38bde14d61a73e5c8b5823b0257d5254a72689.tar.gz
bcm5719-llvm-9e38bde14d61a73e5c8b5823b0257d5254a72689.zip
Enhance debug info namespace test to check for context/scope reference
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. llvm-svn: 177559
Diffstat (limited to 'clang/test/CodeGenCXX/debug-info-namespace.cpp')
-rw-r--r--clang/test/CodeGenCXX/debug-info-namespace.cpp7
1 files changed, 6 insertions, 1 deletions
diff --git a/clang/test/CodeGenCXX/debug-info-namespace.cpp b/clang/test/CodeGenCXX/debug-info-namespace.cpp
index b29f2703f3a..ccc0d1818d3 100644
--- a/clang/test/CodeGenCXX/debug-info-namespace.cpp
+++ b/clang/test/CodeGenCXX/debug-info-namespace.cpp
@@ -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]
OpenPOWER on IntegriCloud