r177118 - Always declare the .block_descriptor parameter, not just the local copy.
Eric Christopher
echristo at gmail.com
Thu Mar 14 15:09:14 PDT 2013
Testcase? :)
-eric
On Thu, Mar 14, 2013 at 2:52 PM, Adrian Prantl <aprantl at apple.com> wrote:
> Author: adrian
> Date: Thu Mar 14 16:52:59 2013
> New Revision: 177118
>
> URL: http://llvm.org/viewvc/llvm-project?rev=177118&view=rev
> Log:
> Always declare the .block_descriptor parameter, not just the local copy.
> Un-breaks gdb's invoke-block behavior.
>
> Modified:
> cfe/trunk/lib/CodeGen/CGDebugInfo.cpp
>
> Modified: cfe/trunk/lib/CodeGen/CGDebugInfo.cpp
> URL:
> http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/CodeGen/CGDebugInfo.cpp?rev=177118&r1=177117&r2=177118&view=diff
>
> ==============================================================================
> --- cfe/trunk/lib/CodeGen/CGDebugInfo.cpp (original)
> +++ cfe/trunk/lib/CodeGen/CGDebugInfo.cpp Thu Mar 14 16:52:59 2013
> @@ -2817,17 +2817,18 @@ void CGDebugInfo::EmitDeclareOfBlockLite
> CGM.getLangOpts().Optimize, flags,
> cast<llvm::Argument>(Arg)->getArgNo() +
> 1);
>
> - // Matching the code in EmitParmDecl, depending on optimization level.
> - llvm::Instruction *Call;
> - if (LocalAddr)
> + if (LocalAddr) {
> // Insert an llvm.dbg.value into the current block.
> - Call = DBuilder.insertDbgValueIntrinsic(LocalAddr, 0, debugVar,
> - Builder.GetInsertBlock());
> - else
> - // Insert an llvm.dbg.declare into the current block.
> - Call = DBuilder.insertDeclare(Arg, debugVar,
> Builder.GetInsertBlock());
> + llvm::Instruction *DbgVal =
> + DBuilder.insertDbgValueIntrinsic(LocalAddr, 0, debugVar,
> + Builder.GetInsertBlock());
> + DbgVal->setDebugLoc(llvm::DebugLoc::get(line, column, scope));
> + }
>
> - Call->setDebugLoc(llvm::DebugLoc::get(line, column, scope));
> + // Insert an llvm.dbg.declare into the current block.
> + llvm::Instruction *DbgDecl =
> + DBuilder.insertDeclare(Arg, debugVar, Builder.GetInsertBlock());
> + DbgDecl->setDebugLoc(llvm::DebugLoc::get(line, column, scope));
> }
>
> /// getStaticDataMemberDeclaration - If D is an out-of-class definition of
>
>
> _______________________________________________
> cfe-commits mailing list
> cfe-commits at cs.uiuc.edu
> http://lists.cs.uiuc.edu/mailman/listinfo/cfe-commits
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/cfe-commits/attachments/20130314/9d8d976b/attachment.html>
More information about the cfe-commits
mailing list