From: Devang Patel Date: Fri, 25 Mar 2011 21:26:13 +0000 (+0000) Subject: Provide blockDecl's startLoc to startFunction. This fixes hidden bug exposed by recen... X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=3f4cb252832cf14f72d66ed707316d3759c8a689;p=clang 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. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@128303 91177308-0d34-0410-b5e6-96231b3b80d8 --- diff --git a/lib/CodeGen/CGBlocks.cpp b/lib/CodeGen/CGBlocks.cpp index 8351d36f25..20350c8e6a 100644 --- a/lib/CodeGen/CGBlocks.cpp +++ b/lib/CodeGen/CGBlocks.cpp @@ -914,7 +914,7 @@ CodeGenFunction::GenerateBlockFunction(GlobalDecl GD, // 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.