Update for LLVM API change, and contextify a bunch of related stuff.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@75705 91177308-0d34-0410-b5e6-96231b3b80d8
diff --git a/lib/CodeGen/CGExprComplex.cpp b/lib/CodeGen/CGExprComplex.cpp
index c4aaa1f..b5597ad 100644
--- a/lib/CodeGen/CGExprComplex.cpp
+++ b/lib/CodeGen/CGExprComplex.cpp
@@ -367,6 +367,8 @@
 
 ComplexPairTy ComplexExprEmitter::VisitPrePostIncDec(const UnaryOperator *E,
                                                      bool isInc, bool isPre) {
+  llvm::LLVMContext &VMContext = CGF.getLLVMContext();
+
   LValue LV = CGF.EmitLValue(E->getSubExpr());
   ComplexPairTy InVal = EmitLoadOfComplex(LV.getAddress(),
                                           LV.isVolatileQualified());
@@ -374,7 +376,7 @@
   llvm::Value *NextVal;
   if (isa<llvm::IntegerType>(InVal.first->getType())) {
     uint64_t AmountVal = isInc ? 1 : -1;
-    NextVal = llvm::ConstantInt::get(InVal.first->getType(), AmountVal, true);
+    NextVal = VMContext.getConstantInt(InVal.first->getType(), AmountVal, true);
     
     // Add the inc/dec to the real part.
     NextVal = Builder.CreateAdd(InVal.first, NextVal, isInc ? "inc" : "dec");
@@ -384,7 +386,7 @@
     llvm::APFloat FVal(CGF.getContext().getFloatTypeSemantics(ElemTy), 1);
     if (!isInc)
       FVal.changeSign();
-    NextVal = llvm::ConstantFP::get(FVal);
+    NextVal = VMContext.getConstantFP(FVal);
     
     // Add the inc/dec to the real part.
     NextVal = Builder.CreateFAdd(InVal.first, NextVal, isInc ? "inc" : "dec");