summaryrefslogtreecommitdiffstats
path: root/clang/test/CodeGen
diff options
context:
space:
mode:
authorEric Christopher <echristo@apple.com>2011-10-11 23:00:55 +0000
committerEric Christopher <echristo@apple.com>2011-10-11 23:00:55 +0000
commit498b7fd7fead79c5ba6bcabc34fd296bd4a61d43 (patch)
tree57d1f57763554231b754ee9d49ff1443fd560c1b /clang/test/CodeGen
parentfefafacf68ade0587cde048de7aaddadf37ec16a (diff)
downloadbcm5719-llvm-498b7fd7fead79c5ba6bcabc34fd296bd4a61d43.tar.gz
bcm5719-llvm-498b7fd7fead79c5ba6bcabc34fd296bd4a61d43.zip
Start handling debug line and scope information better:
Migrate most of the location setting within the larger API in CGDebugInfo and update a lot of callers. Remove the existing file/scope change machinery in UpdateLineDirectiveRegion and replace it with DILexicalBlockFile usage. Finishes off the rest of rdar://10246360 llvm-svn: 141732
Diffstat (limited to 'clang/test/CodeGen')
-rw-r--r--clang/test/CodeGen/debug-info-line.c14
1 files changed, 11 insertions, 3 deletions
diff --git a/clang/test/CodeGen/debug-info-line.c b/clang/test/CodeGen/debug-info-line.c
index b255d90b34c..9e6e9714aa4 100644
--- a/clang/test/CodeGen/debug-info-line.c
+++ b/clang/test/CodeGen/debug-info-line.c
@@ -1,8 +1,9 @@
-// RUN: %clang -emit-llvm -S -g %s -o %t
-// RUN: grep DW_TAG_lexical_block %t | count 3
+// RUN: %clang -emit-llvm -S -g %s -o - | FileCheck %s
// Radar 8396182
-// There are three lexical blocks in this test case.
+// There is only one lexical block, but we need a DILexicalBlock and two
+// DILexicalBlockFile to correctly represent file info. This means we have
+// two lexical blocks shown as the latter is also tagged as a lexical block.
int foo() {
int i = 1;
@@ -13,3 +14,10 @@ int foo() {
# 5 "m.c" 2
return i + j;
}
+
+// CHECK: DW_TAG_lexical_block
+// CHECK: DW_TAG_lexical_block
+// CHECK: !"m.h"
+// CHECK: DW_TAG_lexical_block
+// CHECK: !"m.c"
+// CHECK-NOT: DW_TAG_lexical_block
OpenPOWER on IntegriCloud