Push LLVMContexts through the IntegerType APIs.
[oota-llvm.git] / lib / Target / ARM / ARMBaseRegisterInfo.cpp
index 98a08e12d685c52381b5ce1a23f6768f70830616..309a5c6eb5dea7f5ddb50b0b7f294a07aa023d04 100644 (file)
@@ -903,7 +903,8 @@ emitLoadConstPool(MachineBasicBlock &MBB,
                   unsigned PredReg) const {
   MachineFunction &MF = *MBB.getParent();
   MachineConstantPool *ConstantPool = MF.getConstantPool();
-  Constant *C = ConstantInt::get(Type::Int32Ty, Val);
+  Constant *C =
+        ConstantInt::get(Type::getInt32Ty(MF.getFunction()->getContext()), Val);
   unsigned Idx = ConstantPool->getConstantPoolIndex(C, 4);
 
   BuildMI(MBB, MBBI, dl, TII.get(ARM::LDRcp))