diff options
author | Adrian Prantl <aprantl@apple.com> | 2013-03-14 21:52:59 +0000 |
---|---|---|
committer | Adrian Prantl <aprantl@apple.com> | 2013-03-14 21:52:59 +0000 |
commit | 616bef4ad164a0ddde9d26533514f5ab305915da (patch) | |
tree | 108b19784524d2b9021da4b26ddf865b7083e65d /clang/lib/CodeGen/CGDebugInfo.cpp | |
parent | 3101ba3300856fe3fba5f2f819d42388651a8f61 (diff) | |
download | bcm5719-llvm-616bef4ad164a0ddde9d26533514f5ab305915da.tar.gz bcm5719-llvm-616bef4ad164a0ddde9d26533514f5ab305915da.zip |
Always declare the .block_descriptor parameter, not just the local copy.
Un-breaks gdb's invoke-block behavior.
llvm-svn: 177118
Diffstat (limited to 'clang/lib/CodeGen/CGDebugInfo.cpp')
-rw-r--r-- | clang/lib/CodeGen/CGDebugInfo.cpp | 19 |
1 files changed, 10 insertions, 9 deletions
diff --git a/clang/lib/CodeGen/CGDebugInfo.cpp b/clang/lib/CodeGen/CGDebugInfo.cpp index 6b0edbcafe6..ae88732c821 100644 --- a/clang/lib/CodeGen/CGDebugInfo.cpp +++ b/clang/lib/CodeGen/CGDebugInfo.cpp @@ -2817,17 +2817,18 @@ void CGDebugInfo::EmitDeclareOfBlockLiteralArgVariable(const CGBlockInfo &block, 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 |