summaryrefslogtreecommitdiff
path: root/MLKLLVMCompiler.mm
diff options
context:
space:
mode:
Diffstat (limited to 'MLKLLVMCompiler.mm')
-rw-r--r--MLKLLVMCompiler.mm4
1 files changed, 4 insertions, 0 deletions
diff --git a/MLKLLVMCompiler.mm b/MLKLLVMCompiler.mm
index aa0ab79..745be44 100644
--- a/MLKLLVMCompiler.mm
+++ b/MLKLLVMCompiler.mm
@@ -51,7 +51,11 @@ using namespace llvm;
static ExecutionEngine *execution_engine;
static llvm::Module *module;
+#if defined(LLVM_MAJOR_VERSION) && (LLVM_MAJOR_VERSION <= 2) && (LLVM_MINOR_VERSION <= 3)
+static IRBuilder builder;
+#else
static IRBuilder<true, ConstantFolder> builder;
+#endif
static FunctionPassManager *fpm;
static PointerType *PointerTy;
static ModuleProvider *module_provider;