Revert the ConstantInt constructors back to their 2.5 forms where possible, thanks to contexts-on-types.  More to come.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@77011 91177308-0d34-0410-b5e6-96231b3b80d8
diff --git a/lib/Bitcode/Reader/BitcodeReader.cpp b/lib/Bitcode/Reader/BitcodeReader.cpp
index 01b3eb3..cf90c64 100644
--- a/lib/Bitcode/Reader/BitcodeReader.cpp
+++ b/lib/Bitcode/Reader/BitcodeReader.cpp
@@ -877,7 +877,7 @@
     case bitc::CST_CODE_INTEGER:   // INTEGER: [intval]
       if (!isa<IntegerType>(CurTy) || Record.empty())
         return Error("Invalid CST_INTEGER record");
-      V = Context.getConstantInt(CurTy, DecodeSignRotatedValue(Record[0]));
+      V = ConstantInt::get(CurTy, DecodeSignRotatedValue(Record[0]));
       break;
     case bitc::CST_CODE_WIDE_INTEGER: {// WIDE_INTEGER: [n x intval]
       if (!isa<IntegerType>(CurTy) || Record.empty())
@@ -888,8 +888,9 @@
       Words.resize(NumWords);
       for (unsigned i = 0; i != NumWords; ++i)
         Words[i] = DecodeSignRotatedValue(Record[i]);
-      V = Context.getConstantInt(APInt(cast<IntegerType>(CurTy)->getBitWidth(),
-                                 NumWords, &Words[0]));
+      V = ConstantInt::get(Context, 
+                           APInt(cast<IntegerType>(CurTy)->getBitWidth(),
+                           NumWords, &Words[0]));
       break;
     }
     case bitc::CST_CODE_FLOAT: {    // FLOAT: [fpval]
@@ -951,7 +952,7 @@
       unsigned Size = Record.size();
       std::vector<Constant*> Elts;
       for (unsigned i = 0; i != Size; ++i)
-        Elts.push_back(Context.getConstantInt(EltTy, Record[i]));
+        Elts.push_back(ConstantInt::get(EltTy, Record[i]));
       V = Context.getConstantArray(ATy, Elts);
       break;
     }
@@ -965,7 +966,7 @@
       unsigned Size = Record.size();
       std::vector<Constant*> Elts;
       for (unsigned i = 0; i != Size; ++i)
-        Elts.push_back(Context.getConstantInt(EltTy, Record[i]));
+        Elts.push_back(ConstantInt::get(EltTy, Record[i]));
       Elts.push_back(Context.getNullValue(EltTy));
       V = Context.getConstantArray(ATy, Elts);
       break;