mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2025-09-11 08:29:25 +00:00
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 git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@224015 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
@@ -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)));
|
||||
}
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user