mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2025-06-20 10:24:12 +00:00
Fix bug: Inline/2003-09-14-InlineValue.ll
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@8514 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
@ -191,10 +191,14 @@ bool InlineFunction(CallSite CS) {
|
|||||||
|
|
||||||
// Next, create the new invoke instruction, inserting it at the end
|
// Next, create the new invoke instruction, inserting it at the end
|
||||||
// of the old basic block.
|
// of the old basic block.
|
||||||
|
InvokeInst *II =
|
||||||
new InvokeInst(CI->getCalledValue(), Split, InvokeDest,
|
new InvokeInst(CI->getCalledValue(), Split, InvokeDest,
|
||||||
std::vector<Value*>(CI->op_begin()+1, CI->op_end()),
|
std::vector<Value*>(CI->op_begin()+1, CI->op_end()),
|
||||||
CI->getName(), BB->getTerminator());
|
CI->getName(), BB->getTerminator());
|
||||||
|
|
||||||
|
// Make sure that anything using the call now uses the invoke!
|
||||||
|
CI->replaceAllUsesWith(II);
|
||||||
|
|
||||||
// Delete the unconditional branch inserted by splitBasicBlock
|
// Delete the unconditional branch inserted by splitBasicBlock
|
||||||
BB->getInstList().pop_back();
|
BB->getInstList().pop_back();
|
||||||
Split->getInstList().pop_front(); // Delete the original call
|
Split->getInstList().pop_front(); // Delete the original call
|
||||||
|
Reference in New Issue
Block a user