mirror of
https://github.com/RPCS3/llvm.git
synced 2024-11-26 05:00:39 +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