Move more code back to 2.5 APIs.
[oota-llvm.git] / lib / Transforms / IPO / RaiseAllocations.cpp
index 943d3cf1605d737701ab729fe4b3ad7d9624f4ab..0ef0991637983878ebfe70ed2a13bae70016f732 100644 (file)
@@ -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;