mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2025-06-17 20:23:59 +00:00
Fix PR22386. The inliner moves static allocas to the entry basic block
so we need to move the dbg.declare intrinsics that describe them, too. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@227544 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
@ -1111,6 +1111,14 @@ bool llvm::InlineFunction(CallSite CS, InlineFunctionInfo &IFI,
|
||||
FirstNewBlock->getInstList(),
|
||||
AI, I);
|
||||
}
|
||||
// Move any dbg.declares describing the allocas into the entry basic block.
|
||||
for (auto &I : IFI.StaticAllocas)
|
||||
if (auto AI = dyn_cast<AllocaInst>(I))
|
||||
if (auto *DDI = FindAllocaDbgDeclare(AI))
|
||||
if (DDI->getParent() != Caller->begin())
|
||||
Caller->getEntryBlock().getInstList()
|
||||
.splice(AI->getNextNode(), FirstNewBlock->getInstList(),
|
||||
DDI, DDI->getNextNode());
|
||||
}
|
||||
|
||||
bool InlinedMustTailCalls = false;
|
||||
|
Reference in New Issue
Block a user