diff options
author | bartus | 2019-03-26 22:45:11 +0100 |
---|---|---|
committer | bartus | 2019-03-26 22:45:11 +0100 |
commit | 734e8704e4f4957e2a2f6e37eb95dfcb1df591d3 (patch) | |
tree | b1100fc20bc08fe1f7fa446d836bead972e6f318 /llvm.patch | |
download | aur-734e8704e4f4957e2a2f6e37eb95dfcb1df591d3.tar.gz |
init
Diffstat (limited to 'llvm.patch')
-rw-r--r-- | llvm.patch | 48 |
1 files changed, 48 insertions, 0 deletions
diff --git a/llvm.patch b/llvm.patch new file mode 100644 index 000000000000..d9b3d71b2744 --- /dev/null +++ b/llvm.patch @@ -0,0 +1,48 @@ +diff --git a/CMakeLists.txt b/CMakeLists.txt +index 1108aa2..049e0b7 100644 +--- a/CMakeLists.txt ++++ b/CMakeLists.txt +@@ -88,7 +88,7 @@ set(LLVM_LIB "") + if (ENABLE_LLVM_BACKEND) + set(LLVM_DIR /usr/share/llvm/cmake CACHE PATH "Where to search for LLVM i.e. ") + +- find_package(LLVM CONFIG NAMES LLVM CONFIGS LLVM-Config.cmake LLVMConfig.cmake) ++ find_package(LLVM) + if (LLVM_FOUND) + set(SEEXPR_ENABLE_LLVM_BACKEND 1) + message(STATUS "Using LLVMConfig.cmake in: ${LLVM_DIR}") +diff --git a/src/SeExpr/Evaluator.h b/src/SeExpr/Evaluator.h +index 213ccba..5d82fa5 100644 +--- a/src/SeExpr/Evaluator.h ++++ b/src/SeExpr/Evaluator.h +@@ -172,7 +172,7 @@ class LLVMEvaluator { + }; + FunctionType *FT = FunctionType::get(voidTy, ParamTys, false); + Function *F = Function::Create(FT, Function::ExternalLinkage, uniqueName + "_func", TheModule.get()); +- F->addAttribute(llvm::AttributeSet::FunctionIndex, llvm::Attribute::AlwaysInline); ++ F->addAttribute(llvm::AttributeList::FunctionIndex, llvm::Attribute::AlwaysInline); + { + // label the function with names + const char *names[] = {"outputPointer", "dataBlock", "indirectIndex"}; +@@ -288,8 +288,10 @@ class LLVMEvaluator { + } + + if (Expression::debugging) { ++ #ifdef DEBUG + std::cerr << "Pre verified LLVM byte code " << std::endl; + TheModule->dump(); ++ #endif + } + + // TODO: Find out if there is a new way to veirfy +@@ -361,8 +363,10 @@ class LLVMEvaluator { + } + + if (Expression::debugging) { ++ #ifdef DEBUG + std::cerr << "Pre verified LLVM byte code " << std::endl; + altModule->dump(); ++ #endif + } + + return true; |