diff options
author | Peter Collingbourne <peter@pcc.me.uk> | 2011-07-20 18:36:48 +0000 |
---|---|---|
committer | Peter Collingbourne <peter@pcc.me.uk> | 2011-07-20 18:36:48 +0000 |
commit | b640fcf217c848ad051977018c6dc8f3a5a37e1f (patch) | |
tree | 70c49e15714efdd13bfa096352701638c3b23db1 /lib/Module/RaiseAsm.cpp | |
parent | ed9ea0cf9dc856920afc6813fa1bea0ec7660ba1 (diff) | |
download | klee-b640fcf217c848ad051977018c6dc8f3a5a37e1f.tar.gz |
Updates for LLVM 3.0. Based on changes by arrowdodger, thanks!
git-svn-id: https://llvm.org/svn/llvm-project/klee/trunk@135598 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/Module/RaiseAsm.cpp')
-rw-r--r-- | lib/Module/RaiseAsm.cpp | 11 |
1 files changed, 10 insertions, 1 deletions
diff --git a/lib/Module/RaiseAsm.cpp b/lib/Module/RaiseAsm.cpp index 8f862ffa..6f6a5c90 100644 --- a/lib/Module/RaiseAsm.cpp +++ b/lib/Module/RaiseAsm.cpp @@ -28,9 +28,14 @@ char RaiseAsmPass::ID = 0; Function *RaiseAsmPass::getIntrinsic(llvm::Module &M, unsigned IID, - const Type **Tys, + LLVM_TYPE_Q Type **Tys, unsigned NumTys) { +#if LLVM_VERSION_CODE >= LLVM_VERSION(3, 0) + return Intrinsic::getDeclaration(&M, (llvm::Intrinsic::ID) IID, + llvm::ArrayRef<llvm::Type*>(Tys, NumTys)); +#else return Intrinsic::getDeclaration(&M, (llvm::Intrinsic::ID) IID, Tys, NumTys); +#endif } // FIXME: This should just be implemented as a patch to @@ -87,7 +92,11 @@ bool RaiseAsmPass::runOnModule(Module &M) { llvm::errs() << "Warning: unable to select native target: " << Err << "\n"; TLI = 0; } else { +#if LLVM_VERSION_CODE >= LLVM_VERSION(3, 0) + TargetMachine *TM = NativeTarget->createTargetMachine(HostTriple, "", ""); +#else TargetMachine *TM = NativeTarget->createTargetMachine(HostTriple, ""); +#endif TLI = TM->getTargetLowering(); } #endif |