aboutsummaryrefslogtreecommitdiff
path: root/lib/CodeGen/CGStmt.cpp
diff options
context:
space:
mode:
authorDevang Patel <dpatel@apple.com>2010-05-12 00:39:34 +0000
committerDevang Patel <dpatel@apple.com>2010-05-12 00:39:34 +0000
commit60e4fd95ed8c1f99697f4d9f73d07717b6e21048 (patch)
tree5d75ccab16c4136195991b85fd44bdaf7694da9d /lib/CodeGen/CGStmt.cpp
parenta48412a38e8acac45721fad09cd55df3dc7b4e76 (diff)
Use end location of DeclStmt to mark stop point.
This is meaningful for blocks. This patch fixes bunch of test failures in gdb testsuite. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@103533 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/CodeGen/CGStmt.cpp')
-rw-r--r--lib/CodeGen/CGStmt.cpp5
1 files changed, 4 insertions, 1 deletions
diff --git a/lib/CodeGen/CGStmt.cpp b/lib/CodeGen/CGStmt.cpp
index a914c80da2..772f640ed0 100644
--- a/lib/CodeGen/CGStmt.cpp
+++ b/lib/CodeGen/CGStmt.cpp
@@ -30,7 +30,10 @@ using namespace CodeGen;
void CodeGenFunction::EmitStopPoint(const Stmt *S) {
if (CGDebugInfo *DI = getDebugInfo()) {
- DI->setLocation(S->getLocStart());
+ if (isa<DeclStmt>(S))
+ DI->setLocation(S->getLocEnd());
+ else
+ DI->setLocation(S->getLocStart());
DI->EmitStopPoint(CurFn, Builder);
}
}