[cfe-commits] r103533 - /cfe/trunk/lib/CodeGen/CGStmt.cpp
Devang Patel
dpatel at apple.com
Tue May 11 17:39:34 PDT 2010
Author: dpatel
Date: Tue May 11 19:39:34 2010
New Revision: 103533
URL: http://llvm.org/viewvc/llvm-project?rev=103533&view=rev
Log:
Use end location of DeclStmt to mark stop point.
This is meaningful for blocks. This patch fixes bunch of test failures in gdb testsuite.
Modified:
cfe/trunk/lib/CodeGen/CGStmt.cpp
Modified: cfe/trunk/lib/CodeGen/CGStmt.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/CodeGen/CGStmt.cpp?rev=103533&r1=103532&r2=103533&view=diff
==============================================================================
--- cfe/trunk/lib/CodeGen/CGStmt.cpp (original)
+++ cfe/trunk/lib/CodeGen/CGStmt.cpp Tue May 11 19:39:34 2010
@@ -30,7 +30,10 @@
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);
}
}
More information about the cfe-commits
mailing list