diff options
Diffstat (limited to 'lib/Module/RaiseAsm.cpp')
-rw-r--r-- | lib/Module/RaiseAsm.cpp | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/lib/Module/RaiseAsm.cpp b/lib/Module/RaiseAsm.cpp index 76a4f242..8f862ffa 100644 --- a/lib/Module/RaiseAsm.cpp +++ b/lib/Module/RaiseAsm.cpp @@ -8,13 +8,13 @@ //===----------------------------------------------------------------------===// #include "Passes.h" -#include "klee/Config/config.h" +#include "klee/Config/Version.h" #include "llvm/InlineAsm.h" -#if !(LLVM_VERSION_MAJOR == 2 && LLVM_VERSION_MINOR < 7) +#if LLVM_VERSION_CODE >= LLVM_VERSION(2, 7) #include "llvm/LLVMContext.h" #endif -#if (LLVM_VERSION_MAJOR == 2 && LLVM_VERSION_MINOR >= 9) +#if LLVM_VERSION_CODE >= LLVM_VERSION(2, 9) #include "llvm/Support/raw_ostream.h" #include "llvm/Support/Host.h" #include "llvm/Target/TargetLowering.h" @@ -38,7 +38,7 @@ Function *RaiseAsmPass::getIntrinsic(llvm::Module &M, bool RaiseAsmPass::runOnInstruction(Module &M, Instruction *I) { if (CallInst *ci = dyn_cast<CallInst>(I)) { if (InlineAsm *ia = dyn_cast<InlineAsm>(ci->getCalledValue())) { -#if (LLVM_VERSION_MAJOR == 2 && LLVM_VERSION_MINOR >= 9) +#if LLVM_VERSION_CODE >= LLVM_VERSION(2, 9) (void) ia; return TLI && TLI->ExpandInlineAsm(ci); #else @@ -47,7 +47,7 @@ bool RaiseAsmPass::runOnInstruction(Module &M, Instruction *I) { const llvm::Type *T = ci->getType(); // bswaps -#if (LLVM_VERSION_MAJOR == 2 && LLVM_VERSION_MINOR < 8) +#if LLVM_VERSION_CODE < LLVM_VERSION(2, 8) unsigned NumOperands = ci->getNumOperands(); llvm::Value *Arg0 = NumOperands > 1 ? ci->getOperand(1) : 0; #else @@ -62,7 +62,7 @@ bool RaiseAsmPass::runOnInstruction(Module &M, Instruction *I) { as == "rorw $$8, ${0:w};rorl $$16, $0;rorw $$8, ${0:w}" && cs == "=r,0,~{dirflag},~{fpsr},~{flags},~{cc}"))) { Function *F = getIntrinsic(M, Intrinsic::bswap, Arg0->getType()); -#if (LLVM_VERSION_MAJOR == 2 && LLVM_VERSION_MINOR < 8) +#if LLVM_VERSION_CODE < LLVM_VERSION(2, 8) ci->setOperand(0, F); #else ci->setCalledFunction(F); @@ -79,7 +79,7 @@ bool RaiseAsmPass::runOnInstruction(Module &M, Instruction *I) { bool RaiseAsmPass::runOnModule(Module &M) { bool changed = false; -#if (LLVM_VERSION_MAJOR == 2 && LLVM_VERSION_MINOR >= 9) +#if LLVM_VERSION_CODE >= LLVM_VERSION(2, 9) std::string Err; std::string HostTriple = llvm::sys::getHostTriple(); const Target *NativeTarget = TargetRegistry::lookupTarget(HostTriple, Err); |