diff --git a/src/tcuda.cpp b/src/tcuda.cpp index 3b09c73c..5fb54a89 100644 --- a/src/tcuda.cpp +++ b/src/tcuda.cpp @@ -85,7 +85,7 @@ static void annotateKernel(terra_State * T, llvm::Module * M, llvm::Function * k static const char * cudadatalayout = "e-p:64:64:64-i1:8:8-i8:8:8-i16:16:16-i32:32:32-i64:64:64-f32:32:32-f64:64:64-v16:16:16-v32:32:32-v64:64:64-v128:128:128-n16:32:64"; -#if LLVM_VERSION < 38 +#if LLVM_VERSION <= 38 class RemoveAttr : public llvm::InstVisitor { public: void visitCallInst(llvm::CallInst & I) { @@ -96,7 +96,7 @@ class RemoveAttr : public llvm::InstVisitor { void moduleToPTX(terra_State * T, llvm::Module * M, int major, int minor, std::string * buf, const char * libdevice) { -#if LLVM_VERSION < 38 +#if LLVM_VERSION <= 38 for(llvm::Module::iterator it = M->begin(), end = M->end(); it != end; ++it) { it->setAttributes(llvm::AttributeSet()); //remove annotations because syntax doesn't match RemoveAttr A;