r177559 - Enhance debug info namespace test to check for context/scope reference

David Blaikie dblaikie at gmail.com
Wed Mar 20 12:10:57 PDT 2013


Author: dblaikie
Date: Wed Mar 20 14:10:57 2013
New Revision: 177559

URL: http://llvm.org/viewvc/llvm-project?rev=177559&view=rev
Log:
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.

Modified:
    cfe/trunk/test/CodeGenCXX/debug-info-namespace.cpp

Modified: cfe/trunk/test/CodeGenCXX/debug-info-namespace.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/test/CodeGenCXX/debug-info-namespace.cpp?rev=177559&r1=177558&r2=177559&view=diff
==============================================================================
--- cfe/trunk/test/CodeGenCXX/debug-info-namespace.cpp (original)
+++ cfe/trunk/test/CodeGenCXX/debug-info-namespace.cpp Wed Mar 20 14:10:57 2013
@@ -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]





More information about the cfe-commits mailing list