mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2024-12-17 18:31:04 +00:00
Do not lose line number info while eliminating tail call.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@130419 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
parent
3fb6e00238
commit
81199d2545
@ -573,7 +573,9 @@ bool TailCallElim::EliminateRecursiveTailCall(CallInst *CI, ReturnInst *Ret,
|
||||
|
||||
// Now that all of the PHI nodes are in place, remove the call and
|
||||
// ret instructions, replacing them with an unconditional branch.
|
||||
BranchInst::Create(OldEntry, Ret);
|
||||
BranchInst *NewBI = BranchInst::Create(OldEntry, Ret);
|
||||
NewBI->setDebugLoc(CI->getDebugLoc());
|
||||
|
||||
BB->getInstList().erase(Ret); // Remove return.
|
||||
BB->getInstList().erase(CI); // Remove call.
|
||||
++NumEliminated;
|
||||
|
Loading…
Reference in New Issue
Block a user