Fix bug in previous checkin
authorChris Lattner <sabre@nondot.org>
Tue, 10 Sep 2002 23:31:12 +0000 (23:31 +0000)
committerChris Lattner <sabre@nondot.org>
Tue, 10 Sep 2002 23:31:12 +0000 (23:31 +0000)
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@3672 91177308-0d34-0410-b5e6-96231b3b80d8

lib/Transforms/IPO/RaiseAllocations.cpp

index cc4573586dcfde68e4fbdf6fffecc3532a0edf34..241e1f55eeda1e8a580777765a55afcce9a3bfc4 100644 (file)
@@ -123,6 +123,7 @@ bool RaiseAllocations::runOnBasicBlock(BasicBlock &BB) {
 
         std::string Name(CI->getName()); CI->setName("");
         BI = new MallocInst(PtrSByte, Source, Name, BI);
+        CI->replaceAllUsesWith(BI);
         BIL.erase(I);
         Changed = true;
         ++NumRaised;