summaryrefslogtreecommitdiffstats
path: root/clang/test/CodeGen/debug-info-scope.c
diff options
context:
space:
mode:
authorDavid Blaikie <dblaikie@gmail.com>2013-01-26 22:16:26 +0000
committerDavid Blaikie <dblaikie@gmail.com>2013-01-26 22:16:26 +0000
commit0a21d0da172d2e4e9e6d5d531811f8fb5ea5282a (patch)
tree53713cfbc608d33e51f2d954d967f9b30ad70074 /clang/test/CodeGen/debug-info-scope.c
parent9f4b70dde051d36fe75b8e6a28253419484ecb88 (diff)
downloadbcm5719-llvm-0a21d0da172d2e4e9e6d5d531811f8fb5ea5282a.tar.gz
bcm5719-llvm-0a21d0da172d2e4e9e6d5d531811f8fb5ea5282a.zip
PR14566: Debug Info: avoid top level lexical blocks in functions
One of the gotchas (see changes to CodeGenFunction) was due to the fix in r139416 (for PR10829). This only worked previously because the top level lexical block would set the location to the end of the function, the debug location would be updated (as per r139416), the location would be set to the end of the function again (but that would no-op, since it was the same as the previous location), then the return instruction would be emitted using the debug location. Once the top level lexical block was no longer emitted, the end-of-function location change was causing the debug loc to be updated, regressing that bug. llvm-svn: 173593
Diffstat (limited to 'clang/test/CodeGen/debug-info-scope.c')
-rw-r--r--clang/test/CodeGen/debug-info-scope.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/clang/test/CodeGen/debug-info-scope.c b/clang/test/CodeGen/debug-info-scope.c
index 6051e6ed0fe..9decaeafd50 100644
--- a/clang/test/CodeGen/debug-info-scope.c
+++ b/clang/test/CodeGen/debug-info-scope.c
@@ -4,10 +4,12 @@
int main() {
int j = 0;
int k = 0;
-// CHECK: DW_TAG_auto_variable
+// CHECK: DW_TAG_auto_variable ] [i]
// CHECK-NEXT: DW_TAG_lexical_block
for (int i = 0; i < 10; i++)
j++;
+// CHECK: DW_TAG_auto_variable ] [i]
+// CHECK-NEXT: DW_TAG_lexical_block
for (int i = 0; i < 10; i++)
k++;
return 0;
OpenPOWER on IntegriCloud