diff options
author | Michael Kuperstein <michael.m.kuperstein@intel.com> | 2014-12-11 12:41:10 +0000 |
---|---|---|
committer | Michael Kuperstein <michael.m.kuperstein@intel.com> | 2014-12-11 12:41:10 +0000 |
commit | fffb6996c9aed10bdf8e40d09cc71fa9f70527ff (patch) | |
tree | 761ee695d0bd23d6d64d7a5d21a913f4e77f6290 /llvm/lib/Transforms/Utils/InlineFunction.cpp | |
parent | 0b1db0a535e3eeef8dbce0d4ec98419392f05777 (diff) | |
download | llvm-fffb6996c9aed10bdf8e40d09cc71fa9f70527ff.zip llvm-fffb6996c9aed10bdf8e40d09cc71fa9f70527ff.tar.gz llvm-fffb6996c9aed10bdf8e40d09cc71fa9f70527ff.tar.bz2 |
The inliner needs to fix up debug information for llvm.dbg.declare, not only for llvm.dbg.value.
Patch by Amjad Aboud
Differential Revision: http://reviews.llvm.org/D6525
llvm-svn: 224015
Diffstat (limited to 'llvm/lib/Transforms/Utils/InlineFunction.cpp')
-rw-r--r-- | llvm/lib/Transforms/Utils/InlineFunction.cpp | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/llvm/lib/Transforms/Utils/InlineFunction.cpp b/llvm/lib/Transforms/Utils/InlineFunction.cpp index 147237e..0441d97 100644 --- a/llvm/lib/Transforms/Utils/InlineFunction.cpp +++ b/llvm/lib/Transforms/Utils/InlineFunction.cpp @@ -872,6 +872,12 @@ static void fixupLineNumbers(Function *Fn, Function::iterator FI, DVI->setOperand(2, MetadataAsValue::get( Ctx, createInlinedVariable(DVI->getVariable(), InlinedAt, Ctx))); + } else if (DbgDeclareInst *DDI = dyn_cast<DbgDeclareInst>(BI)) { + LLVMContext &Ctx = BI->getContext(); + MDNode *InlinedAt = BI->getDebugLoc().getInlinedAt(Ctx); + DDI->setOperand(1, MetadataAsValue::get( + Ctx, createInlinedVariable(DDI->getVariable(), + InlinedAt, Ctx))); } } } |