diff options
Diffstat (limited to 'lib/Module/KModule.cpp')
-rw-r--r-- | lib/Module/KModule.cpp | 15 |
1 files changed, 8 insertions, 7 deletions
diff --git a/lib/Module/KModule.cpp b/lib/Module/KModule.cpp index 94c3d05b..a569242e 100644 --- a/lib/Module/KModule.cpp +++ b/lib/Module/KModule.cpp @@ -122,7 +122,7 @@ static Function *getStubFunctionForCtorList(Module *m, assert(!gv->isDeclaration() && !gv->hasInternalLinkage() && "do not support old LLVM style constructor/destructor lists"); - std::vector<const Type*> nullary; + std::vector<LLVM_TYPE_Q Type*> nullary; Function *fn = Function::Create(FunctionType::get(Type::getVoidTy(getGlobalContext()), nullary, false), @@ -181,7 +181,8 @@ static void injectStaticConstructorsAndDestructors(Module *m) { } } -static void forceImport(Module *m, const char *name, const Type *retType, ...) { +static void forceImport(Module *m, const char *name, LLVM_TYPE_Q Type *retType, + ...) { // If module lacks an externally visible symbol for the name then we // need to create one. We have to look in the symbol table because // we want to check everything (global variables, functions, and @@ -194,8 +195,8 @@ static void forceImport(Module *m, const char *name, const Type *retType, ...) { va_list ap; va_start(ap, retType); - std::vector<const Type *> argTypes; - while (const Type *t = va_arg(ap, const Type*)) + std::vector<LLVM_TYPE_Q Type *> argTypes; + while (LLVM_TYPE_Q Type *t = va_arg(ap, LLVM_TYPE_Q Type*)) argTypes.push_back(t); va_end(ap); @@ -208,9 +209,9 @@ void KModule::prepare(const Interpreter::ModuleOptions &opts, if (!MergeAtExit.empty()) { Function *mergeFn = module->getFunction("klee_merge"); if (!mergeFn) { - const llvm::FunctionType *Ty = + LLVM_TYPE_Q llvm::FunctionType *Ty = FunctionType::get(Type::getVoidTy(getGlobalContext()), - std::vector<const Type*>(), false); + std::vector<LLVM_TYPE_Q Type*>(), false); mergeFn = Function::Create(Ty, GlobalVariable::ExternalLinkage, "klee_merge", module); @@ -280,7 +281,7 @@ void KModule::prepare(const Interpreter::ModuleOptions &opts, // by name. We only add them if such a function doesn't exist to // avoid creating stale uses. - const llvm::Type *i8Ty = Type::getInt8Ty(getGlobalContext()); + LLVM_TYPE_Q llvm::Type *i8Ty = Type::getInt8Ty(getGlobalContext()); forceImport(module, "memcpy", PointerType::getUnqual(i8Ty), PointerType::getUnqual(i8Ty), PointerType::getUnqual(i8Ty), |