forked from OSchip/llvm-project
Always declare the .block_descriptor parameter, not just the local copy.
Un-breaks gdb's invoke-block behavior. llvm-svn: 177118
This commit is contained in:
parent
3101ba3300
commit
616bef4ad1
|
@ -2817,17 +2817,18 @@ void CGDebugInfo::EmitDeclareOfBlockLiteralArgVariable(const CGBlockInfo &block,
|
||||||
CGM.getLangOpts().Optimize, flags,
|
CGM.getLangOpts().Optimize, flags,
|
||||||
cast<llvm::Argument>(Arg)->getArgNo() + 1);
|
cast<llvm::Argument>(Arg)->getArgNo() + 1);
|
||||||
|
|
||||||
// Matching the code in EmitParmDecl, depending on optimization level.
|
if (LocalAddr) {
|
||||||
llvm::Instruction *Call;
|
|
||||||
if (LocalAddr)
|
|
||||||
// Insert an llvm.dbg.value into the current block.
|
// Insert an llvm.dbg.value into the current block.
|
||||||
Call = DBuilder.insertDbgValueIntrinsic(LocalAddr, 0, debugVar,
|
llvm::Instruction *DbgVal =
|
||||||
Builder.GetInsertBlock());
|
DBuilder.insertDbgValueIntrinsic(LocalAddr, 0, debugVar,
|
||||||
else
|
Builder.GetInsertBlock());
|
||||||
// Insert an llvm.dbg.declare into the current block.
|
DbgVal->setDebugLoc(llvm::DebugLoc::get(line, column, scope));
|
||||||
Call = DBuilder.insertDeclare(Arg, debugVar, Builder.GetInsertBlock());
|
}
|
||||||
|
|
||||||
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
|
/// getStaticDataMemberDeclaration - If D is an out-of-class definition of
|
||||||
|
|
Loading…
Reference in New Issue