Move more code back to 2.5 APIs.
[oota-llvm.git] / tools / bugpoint / ExtractFunction.cpp
index ea40caaf3d92aaf5a5b539cf337d554a64ec144d..f443f36d0b1d6069e3445a6f07abdaa89b7d4573 100644 (file)
@@ -72,7 +72,7 @@ Module *BugDriver::deleteInstructionFromProgram(const Instruction *I,
 
   // If this instruction produces a value, replace any users with null values
   if (isa<StructType>(TheInst->getType()))
-    TheInst->replaceAllUsesWith(Context.getUndef(TheInst->getType()));
+    TheInst->replaceAllUsesWith(UndefValue::get(TheInst->getType()));
   else if (TheInst->getType() != Type::VoidTy)
     TheInst->replaceAllUsesWith(Context.getNullValue(TheInst->getType()));