Move more code back to 2.5 APIs.
[oota-llvm.git] / lib / Transforms / Scalar / SimplifyCFGPass.cpp
index 3596ed6b14fbf370e1295b5608481f4ed033dc5d..3ea6ddd67c2d8e705a4ed5d35da612acbac3e25a 100644 (file)
@@ -71,7 +71,7 @@ static void ChangeToUnreachable(Instruction *I, LLVMContext &Context) {
   BasicBlock::iterator BBI = I, BBE = BB->end();
   while (BBI != BBE) {
     if (!BBI->use_empty())
-      BBI->replaceAllUsesWith(Context.getUndef(BBI->getType()));
+      BBI->replaceAllUsesWith(UndefValue::get(BBI->getType()));
     BB->getInstList().erase(BBI++);
   }
 }