Update for LLVM API change.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@77514 91177308-0d34-0410-b5e6-96231b3b80d8
diff --git a/lib/CodeGen/CGDecl.cpp b/lib/CodeGen/CGDecl.cpp
index 554c4f0..3c3814c 100644
--- a/lib/CodeGen/CGDecl.cpp
+++ b/lib/CodeGen/CGDecl.cpp
@@ -194,7 +194,7 @@
   // RAUW's the GV uses of this constant will be invalid.
   const llvm::Type *LTy = CGM.getTypes().ConvertTypeForMem(D.getType());
   const llvm::Type *LPtrTy =
-    VMContext.getPointerType(LTy, D.getType().getAddressSpace());
+    llvm::PointerType::get(LTy, D.getType().getAddressSpace());
   DMEntry = llvm::ConstantExpr::getBitCast(GV, LPtrTy);
 
   // Emit global variable debug descriptor for static vars.
@@ -225,7 +225,7 @@
   bool needsCopyDispose = BlockRequiresCopying(Ty);
   std::vector<const llvm::Type *> Types(needsCopyDispose*2+5);
   const llvm::PointerType *PtrToInt8Ty
-    = VMContext.getPointerTypeUnqual(llvm::Type::Int8Ty);
+    = llvm::PointerType::getUnqual(llvm::Type::Int8Ty);
   Types[0] = PtrToInt8Ty;
   Types[1] = PtrToInt8Ty;
   Types[2] = llvm::Type::Int32Ty;
@@ -238,7 +238,7 @@
   assert((Align <= unsigned(Target.getPointerAlign(0))/8)
          && "Can't align more than pointer yet");
   Types[needsCopyDispose*2 + 4] = LTy;
-  return VMContext.getStructType(Types, false);
+  return llvm::StructType::get(Types, false);
 }
 
 /// EmitLocalBlockVarDecl - Emit code and set up an entry in LocalDeclMap for a
@@ -283,7 +283,7 @@
     if (!DidCallStackSave) {
       // Save the stack.
       const llvm::Type *LTy =
-        VMContext.getPointerTypeUnqual(llvm::Type::Int8Ty);
+        llvm::PointerType::getUnqual(llvm::Type::Int8Ty);
       llvm::Value *Stack = CreateTempAlloca(LTy, "saved_stack");
       
       llvm::Value *F = CGM.getIntrinsic(llvm::Intrinsic::stacksave);
@@ -306,7 +306,7 @@
     // Get the element type.
     const llvm::Type *LElemTy = ConvertTypeForMem(Ty);    
     const llvm::Type *LElemPtrTy =
-      VMContext.getPointerType(LElemTy, D.getType().getAddressSpace());
+      llvm::PointerType::get(LElemTy, D.getType().getAddressSpace());
 
     llvm::Value *VLASize = EmitVLASize(Ty);
 
@@ -376,7 +376,7 @@
   
   if (isByRef) {
     const llvm::PointerType *PtrToInt8Ty
-      = VMContext.getPointerTypeUnqual(llvm::Type::Int8Ty);
+      = llvm::PointerType::getUnqual(llvm::Type::Int8Ty);
 
     EnsureInsertPoint();
     llvm::Value *isa_field = Builder.CreateStructGEP(DeclPtr, 0);