summaryrefslogtreecommitdiffstats
path: root/clang/lib/CodeGen/CGDebugInfo.cpp
diff options
context:
space:
mode:
authorDavid Blaikie <dblaikie@gmail.com>2013-02-01 19:09:49 +0000
committerDavid Blaikie <dblaikie@gmail.com>2013-02-01 19:09:49 +0000
commit357aafb566cdaf5ac689d787f08db998545ce1e1 (patch)
tree4ab90c3ed7a6288290e8bda8738e2c1f36de88c6 /clang/lib/CodeGen/CGDebugInfo.cpp
parentd0ef72808ce5474add9ecbf8d7d6b5e7620b6d8e (diff)
downloadbcm5719-llvm-357aafb566cdaf5ac689d787f08db998545ce1e1.tar.gz
bcm5719-llvm-357aafb566cdaf5ac689d787f08db998545ce1e1.zip
Fix exception handling line table problems introduced by r173593
r173593 made us a little too eager to associate all code at the end of a function with the user-written 'return' line. This caused problems with breakpoints as they'd be set in exception handling code preceeding the actual non-exception return handling code, leading to the breakpoint never being hit in non-exceptional execution. This change restores the pre-r173593 exception handling line information where the cleanup code is associated with the '}' not the return line. llvm-svn: 174206
Diffstat (limited to 'clang/lib/CodeGen/CGDebugInfo.cpp')
-rw-r--r--clang/lib/CodeGen/CGDebugInfo.cpp4
1 files changed, 3 insertions, 1 deletions
diff --git a/clang/lib/CodeGen/CGDebugInfo.cpp b/clang/lib/CodeGen/CGDebugInfo.cpp
index ca810e7cf54..5e60bd8f66c 100644
--- a/clang/lib/CodeGen/CGDebugInfo.cpp
+++ b/clang/lib/CodeGen/CGDebugInfo.cpp
@@ -2205,7 +2205,9 @@ void CGDebugInfo::EmitLocation(CGBuilderTy &Builder, SourceLocation Loc) {
if (CurLoc == PrevLoc ||
SM.getExpansionLoc(CurLoc) == SM.getExpansionLoc(PrevLoc))
// New Builder may not be in sync with CGDebugInfo.
- if (!Builder.getCurrentDebugLocation().isUnknown())
+ if (!Builder.getCurrentDebugLocation().isUnknown() &&
+ Builder.getCurrentDebugLocation().getScope(CGM.getLLVMContext()) ==
+ LexicalBlockStack.back())
return;
// Update last state.
OpenPOWER on IntegriCloud