1
0
mirror of https://github.com/RPCS3/llvm-mirror.git synced 2024-11-24 11:42:57 +01:00

Fix bug: 2004-11-08-FreeUseCrash.ll

llvm-svn: 17642
This commit is contained in:
Chris Lattner 2004-11-09 05:10:56 +00:00
parent eabfcfca53
commit b924e8be62

View File

@ -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;
}