From: Chris Lattner Date: Tue, 10 Sep 2002 23:31:12 +0000 (+0000) Subject: Fix bug in previous checkin X-Git-Url: http://demsky.eecs.uci.edu/git/?a=commitdiff_plain;h=08c2e4838de6b5aebcccb13ef067283c5241f8f2;p=oota-llvm.git Fix bug in previous checkin git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@3672 91177308-0d34-0410-b5e6-96231b3b80d8 --- diff --git a/lib/Transforms/IPO/RaiseAllocations.cpp b/lib/Transforms/IPO/RaiseAllocations.cpp index cc4573586dc..241e1f55eed 100644 --- a/lib/Transforms/IPO/RaiseAllocations.cpp +++ b/lib/Transforms/IPO/RaiseAllocations.cpp @@ -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;