summaryrefslogtreecommitdiffstats
path: root/clang
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
commit3c2d51a1b980a6848d854490b6cdb7640615b34b (patch)
treeab0996cc0fbf1e93bf7ec1f03b19df970be2083c /clang
parentba2f4c3884d999904143e755ffa0f05ca2b532c4 (diff)
downloadbcm5719-llvm-3c2d51a1b980a6848d854490b6cdb7640615b34b.tar.gz
bcm5719-llvm-3c2d51a1b980a6848d854490b6cdb7640615b34b.zip
Use end location of DeclStmt to mark stop point.
This is meaningful for blocks. This patch fixes bunch of test failures in gdb testsuite. llvm-svn: 103533
Diffstat (limited to 'clang')
-rw-r--r--clang/lib/CodeGen/CGStmt.cpp5
1 files changed, 4 insertions, 1 deletions
diff --git a/clang/lib/CodeGen/CGStmt.cpp b/clang/lib/CodeGen/CGStmt.cpp
index a914c80da2a..772f640ed01 100644
--- a/clang/lib/CodeGen/CGStmt.cpp
+++ b/clang/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);
}
}
OpenPOWER on IntegriCloud