Update for LLVM API changes.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@77638 91177308-0d34-0410-b5e6-96231b3b80d8
diff --git a/lib/CodeGen/CGExprScalar.cpp b/lib/CodeGen/CGExprScalar.cpp
index 59f5c83..dd163a9 100644
--- a/lib/CodeGen/CGExprScalar.cpp
+++ b/lib/CodeGen/CGExprScalar.cpp
@@ -200,7 +200,7 @@
     const llvm::Type *ElementType = VType->getElementType();
 
     // Emit individual vector element stores.
-    llvm::Value *V = VMContext.getUndef(VType);
+    llvm::Value *V = llvm::UndefValue::get(VType);
     
     // Emit initializers
     unsigned i;
@@ -473,7 +473,7 @@
     llvm::Value *Elt = EmitScalarConversion(Src, SrcType, EltTy);
 
     // Insert the element in element zero of an undef vector
-    llvm::Value *UnV = VMContext.getUndef(DstTy);
+    llvm::Value *UnV = llvm::UndefValue::get(DstTy);
     llvm::Value *Idx = llvm::ConstantInt::get(llvm::Type::Int32Ty, 0);
     UnV = Builder.CreateInsertElement(UnV, Elt, Idx, "tmp");
 
@@ -552,7 +552,7 @@
   CGF.ErrorUnsupported(E, "scalar expression");
   if (E->getType()->isVoidType())
     return 0;
-  return VMContext.getUndef(CGF.ConvertType(E->getType()));
+  return llvm::UndefValue::get(CGF.ConvertType(E->getType()));
 }
 
 Value *ScalarExprEmitter::VisitShuffleVectorExpr(ShuffleVectorExpr *E) {
@@ -875,7 +875,7 @@
     // (Note that we do actually need the imaginary part of the RHS for
     // multiplication and division.)
     CGF.ErrorUnsupported(E, "complex compound assignment");
-    return VMContext.getUndef(CGF.ConvertType(E->getType()));
+    return llvm::UndefValue::get(CGF.ConvertType(E->getType()));
   }
 
   // Emit the RHS first.  __block variables need to have the rhs evaluated
@@ -1612,7 +1612,7 @@
 llvm::Value *CodeGenFunction::EmitVector(llvm::Value * const *Vals, 
                                          unsigned NumVals, bool isSplat) {
   llvm::Value *Vec
-    = VMContext.getUndef(llvm::VectorType::get(Vals[0]->getType(), NumVals));
+    = llvm::UndefValue::get(llvm::VectorType::get(Vals[0]->getType(), NumVals));
   
   for (unsigned i = 0, e = NumVals; i != e; ++i) {
     llvm::Value *Val = isSplat ? Vals[0] : Vals[i];