diff options
Diffstat (limited to 'llvm/lib/Transforms/IPO/RaiseAllocations.cpp')
-rw-r--r-- | llvm/lib/Transforms/IPO/RaiseAllocations.cpp | 4 |
1 files changed, 1 insertions, 3 deletions
diff --git a/llvm/lib/Transforms/IPO/RaiseAllocations.cpp b/llvm/lib/Transforms/IPO/RaiseAllocations.cpp index 943d3cf1605..0ef09916379 100644 --- a/llvm/lib/Transforms/IPO/RaiseAllocations.cpp +++ b/llvm/lib/Transforms/IPO/RaiseAllocations.cpp @@ -142,8 +142,6 @@ bool RaiseAllocations::runOnModule(Module &M) { // Find the malloc/free prototypes... doInitialization(M); - LLVMContext &Context = M.getContext(); - bool Changed = false; // First, process all of the malloc calls... @@ -233,7 +231,7 @@ bool RaiseAllocations::runOnModule(Module &M) { // Delete the old call site if (I->getType() != Type::VoidTy) - I->replaceAllUsesWith(Context.getUndef(I->getType())); + I->replaceAllUsesWith(UndefValue::get(I->getType())); I->eraseFromParent(); Changed = true; ++NumRaised; |