mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2024-08-19 04:29:21 +00:00
Fix bug: 2004-11-08-FreeUseCrash.ll
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@17642 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
parent
2fc09aec71
commit
52f20f8308
@ -201,7 +201,9 @@ bool RaiseAllocations::runOnModule(Module &M) {
|
||||
new BranchInst(II->getNormalDest(), I);
|
||||
|
||||
// Delete the old call site
|
||||
I->getParent()->getInstList().erase(I);
|
||||
if (I->getType() != Type::VoidTy)
|
||||
I->replaceAllUsesWith(UndefValue::get(I->getType()));
|
||||
I->eraseFromParent();
|
||||
Changed = true;
|
||||
++NumRaised;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user