diff options
Diffstat (limited to 'lib')
-rw-r--r-- | lib/Core/Executor.cpp | 3 | ||||
-rw-r--r-- | lib/Core/ExternalDispatcher.cpp | 4 |
2 files changed, 3 insertions, 4 deletions
diff --git a/lib/Core/Executor.cpp b/lib/Core/Executor.cpp index 67459650..df9c5b49 100644 --- a/lib/Core/Executor.cpp +++ b/lib/Core/Executor.cpp @@ -1380,8 +1380,7 @@ void Executor::executeInstruction(ExecutionState &state, KInstruction *ki) { // switch to an internal rep. const llvm::IntegerType *Ty = cast<IntegerType>(si->getCondition()->getType()); - ConstantInt *ci = - getGlobalContext().getConstantInt(Ty, CE->getZExtValue()); + ConstantInt *ci = ConstantInt::get(Ty, CE->getZExtValue()); unsigned index = si->findCaseValue(ci); transferToBasicBlock(si->getSuccessor(index), si->getParent(), state); } else { diff --git a/lib/Core/ExternalDispatcher.cpp b/lib/Core/ExternalDispatcher.cpp index a330a7cd..80bff188 100644 --- a/lib/Core/ExternalDispatcher.cpp +++ b/lib/Core/ExternalDispatcher.cpp @@ -198,7 +198,7 @@ Function *ExternalDispatcher::createDispatcher(Function *target, Instruction *in BasicBlock *dBB = BasicBlock::Create("entry", dispatcher); - Instruction *argI64sp = new IntToPtrInst(getGlobalContext().getConstantInt(Type::Int64Ty, (long) (void*) &gTheArgsP), + Instruction *argI64sp = new IntToPtrInst(ConstantInt::get(Type::Int64Ty, (long) (void*) &gTheArgsP), PointerType::getUnqual(PointerType::getUnqual(Type::Int64Ty)), "argsp", dBB); @@ -207,7 +207,7 @@ Function *ExternalDispatcher::createDispatcher(Function *target, Instruction *in unsigned i = 0; for (CallSite::arg_iterator ai = cs.arg_begin(), ae = cs.arg_end(); ai!=ae; ++ai, ++i) { - Value *index = getGlobalContext().getConstantInt(Type::Int32Ty, i+1); + Value *index = ConstantInt::get(Type::Int32Ty, i+1); Instruction *argI64p = GetElementPtrInst::Create(argI64s, index, "", dBB); Instruction *argp = new BitCastInst(argI64p, |