[cfe-commits] r128303 - /cfe/trunk/lib/CodeGen/CGBlocks.cpp
Devang Patel
dpatel at apple.com
Fri Mar 25 14:26:13 PDT 2011
Author: dpatel
Date: Fri Mar 25 16:26:13 2011
New Revision: 128303
URL: http://llvm.org/viewvc/llvm-project?rev=128303&view=rev
Log:
Provide blockDecl's startLoc to startFunction. This fixes hidden bug exposed by recent code gen changes. This is tested by global-blocks-lines.exp in gdb testsuite.
Modified:
cfe/trunk/lib/CodeGen/CGBlocks.cpp
Modified: cfe/trunk/lib/CodeGen/CGBlocks.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/CodeGen/CGBlocks.cpp?rev=128303&r1=128302&r2=128303&view=diff
==============================================================================
--- cfe/trunk/lib/CodeGen/CGBlocks.cpp (original)
+++ cfe/trunk/lib/CodeGen/CGBlocks.cpp Fri Mar 25 16:26:13 2011
@@ -914,7 +914,7 @@
// Begin generating the function.
StartFunction(blockDecl, fnType->getResultType(), fn, fnInfo, args,
- blockInfo.getBlockExpr()->getBody()->getLocEnd());
+ blockInfo.getBlockExpr()->getBody()->getLocStart());
CurFuncDecl = outerFnDecl; // StartFunction sets this to blockDecl
// Okay. Undo some of what StartFunction did.
More information about the cfe-commits
mailing list