summaryrefslogtreecommitdiffstats
path: root/clang/lib/CodeGen/CGStmt.cpp
diff options
context:
space:
mode:
authorDavid Blaikie <dblaikie@gmail.com>2014-08-15 20:50:45 +0000
committerDavid Blaikie <dblaikie@gmail.com>2014-08-15 20:50:45 +0000
commit15c4956b3a05374c2b63cd2f47f4217b721ff4d0 (patch)
tree45e422d53d92ff7b521ac6c7cdff81bef6743586 /clang/lib/CodeGen/CGStmt.cpp
parent3931c28b031c08bc1880b43ef5f530dae81b9b06 (diff)
downloadbcm5719-llvm-15c4956b3a05374c2b63cd2f47f4217b721ff4d0.tar.gz
bcm5719-llvm-15c4956b3a05374c2b63cd2f47f4217b721ff4d0.zip
DebugInfo: Fix PR19864 better - attribute the jump at the end of a range-for loop, to the start of the loop.
This avoids debuggers stepping to strange places (like the last statement in the loop body, or the first statement in the if). This is not the whole answer, though - similar bugs no doubt exist in other loops (patches to follow) and attributing exception handling code to the correct line is also tricky (based on the previous fix to PR19864, exception handling is still erroneously attributed to the 'if' line). llvm-svn: 215766
Diffstat (limited to 'clang/lib/CodeGen/CGStmt.cpp')
-rw-r--r--clang/lib/CodeGen/CGStmt.cpp1
1 files changed, 1 insertions, 0 deletions
diff --git a/clang/lib/CodeGen/CGStmt.cpp b/clang/lib/CodeGen/CGStmt.cpp
index df30892e869..970fdef17aa 100644
--- a/clang/lib/CodeGen/CGStmt.cpp
+++ b/clang/lib/CodeGen/CGStmt.cpp
@@ -974,6 +974,7 @@ CodeGenFunction::EmitCXXForRangeStmt(const CXXForRangeStmt &S,
EmitStmt(S.getBody());
}
+ EmitStopPoint(&S);
// If there is an increment, emit it next.
EmitBlock(Continue.getBlock());
EmitStmt(S.getInc());
OpenPOWER on IntegriCloud