diff options
author | Daniel Dunbar <daniel@zuster.org> | 2009-08-17 00:54:57 +0000 |
---|---|---|
committer | Daniel Dunbar <daniel@zuster.org> | 2009-08-17 00:54:57 +0000 |
commit | 36c9fe87bb38d20850ca50d60facd019af54aa30 (patch) | |
tree | 6c26f044da7a248b497fd9e362f1344b87189844 /lib/Core/ExternalDispatcher.cpp | |
parent | 1d539296be5701036e8c48dac75add46eaf03a3f (diff) | |
download | klee-36c9fe87bb38d20850ca50d60facd019af54aa30.tar.gz |
Update for LLVM API change.
git-svn-id: https://llvm.org/svn/llvm-project/klee/trunk@79217 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/Core/ExternalDispatcher.cpp')
-rw-r--r-- | lib/Core/ExternalDispatcher.cpp | 16 |
1 files changed, 9 insertions, 7 deletions
diff --git a/lib/Core/ExternalDispatcher.cpp b/lib/Core/ExternalDispatcher.cpp index 767fafda..e5b00b7f 100644 --- a/lib/Core/ExternalDispatcher.cpp +++ b/lib/Core/ExternalDispatcher.cpp @@ -188,20 +188,20 @@ Function *ExternalDispatcher::createDispatcher(Function *target, Instruction *in std::vector<const Type*> nullary; - Function *dispatcher = Function::Create(FunctionType::get(Type::VoidTy, + Function *dispatcher = Function::Create(FunctionType::get(Type::getVoidTy(getGlobalContext()), nullary, false), GlobalVariable::ExternalLinkage, "", dispatchModule); - BasicBlock *dBB = BasicBlock::Create("entry", dispatcher); + BasicBlock *dBB = BasicBlock::Create(getGlobalContext(), "entry", dispatcher); // Get a Value* for &gTheArgsP, as an i64**. Instruction *argI64sp = - new IntToPtrInst(ConstantInt::get(Type::Int64Ty, + new IntToPtrInst(ConstantInt::get(Type::getInt64Ty(getGlobalContext()), (uintptr_t) (void*) &gTheArgsP), - PointerType::getUnqual(PointerType::getUnqual(Type::Int64Ty)), + PointerType::getUnqual(PointerType::getUnqual(Type::getInt64Ty(getGlobalContext()))), "argsp", dBB); Instruction *argI64s = new LoadInst(argI64sp, "args", dBB); @@ -219,7 +219,9 @@ Function *ExternalDispatcher::createDispatcher(Function *target, Instruction *in const Type *argTy = (i < FTy->getNumParams() ? FTy->getParamType(i) : (*ai)->getType()); Instruction *argI64p = - GetElementPtrInst::Create(argI64s, ConstantInt::get(Type::Int32Ty, i+1), + GetElementPtrInst::Create(argI64s, + ConstantInt::get(Type::getInt32Ty(getGlobalContext()), + i+1), "", dBB); Instruction *argp = new BitCastInst(argI64p, PointerType::getUnqual(argTy), @@ -228,14 +230,14 @@ Function *ExternalDispatcher::createDispatcher(Function *target, Instruction *in } Instruction *result = CallInst::Create(target, args, args+i, "", dBB); - if (result->getType() != Type::VoidTy) { + if (result->getType() != Type::getVoidTy(getGlobalContext())) { Instruction *resp = new BitCastInst(argI64s, PointerType::getUnqual(result->getType()), "", dBB); new StoreInst(result, resp, dBB); } - ReturnInst::Create(dBB); + ReturnInst::Create(getGlobalContext(), dBB); delete[] args; |