summaryrefslogtreecommitdiffstats
path: root/llvm/lib
diff options
context:
space:
mode:
Diffstat (limited to 'llvm/lib')
-rw-r--r--llvm/lib/Transforms/IPO/RaiseAllocations.cpp1
1 files changed, 1 insertions, 0 deletions
diff --git a/llvm/lib/Transforms/IPO/RaiseAllocations.cpp b/llvm/lib/Transforms/IPO/RaiseAllocations.cpp
index cc4573586dc..241e1f55eed 100644
--- a/llvm/lib/Transforms/IPO/RaiseAllocations.cpp
+++ b/llvm/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;
OpenPOWER on IntegriCloud