diff options
author | Yang Rong <rong.r.yang@intel.com> | 2015-03-03 12:53:43 +0800 |
---|---|---|
committer | Zhigang Gong <zhigang.gong@intel.com> | 2015-03-05 13:02:48 +0800 |
commit | 05da0d9157a1ef7dd735ab1e53b3e676e6591d8a (patch) | |
tree | 4988b3897565fd250be5102c2ebaa71d1ea318ee | |
parent | 04e310e5ed08300a1a7bd05dc85ea2a662cf662f (diff) |
Fix llvm3.6 build error.
LLVM3.6 revert the c api LLVMLinkModules to LLVM3.5 last-minute. Consist with it.
Reviewed-by: "Song, Ruiling" <ruiling.song@intel.com>
-rw-r--r-- | backend/src/backend/gen_program.cpp | 4 | ||||
-rw-r--r-- | backend/src/llvm/llvm_bitcode_link.cpp | 4 |
2 files changed, 0 insertions, 8 deletions
diff --git a/backend/src/backend/gen_program.cpp b/backend/src/backend/gen_program.cpp index 1b296fb0..53d6d869 100644 --- a/backend/src/backend/gen_program.cpp +++ b/backend/src/backend/gen_program.cpp @@ -380,11 +380,7 @@ namespace gbe { llvm::Module* src = (llvm::Module*)((GenProgram*)src_program)->module; llvm::Module* dst = (llvm::Module*)((GenProgram*)dst_program)->module; -#if LLVM_VERSION_MAJOR == 3 && LLVM_VERSION_MINOR <= 5 if (LLVMLinkModules(wrap(dst), wrap(src), LLVMLinkerPreserveSource, &errMsg)) { -#else - if (LLVMLinkModules(wrap(dst), wrap(src), 0, &errMsg)) { -#endif if (err != NULL && errSize != NULL && stringSize > 0u) { strncpy(err, errMsg, stringSize-1); err[stringSize-1] = '\0'; diff --git a/backend/src/llvm/llvm_bitcode_link.cpp b/backend/src/llvm/llvm_bitcode_link.cpp index 96f77810..17248c01 100644 --- a/backend/src/llvm/llvm_bitcode_link.cpp +++ b/backend/src/llvm/llvm_bitcode_link.cpp @@ -240,11 +240,7 @@ namespace gbe /* We use beignet's bitcode as dst because it will have a lot of lazy functions which will not be loaded. */ char* errorMsg; -#if LLVM_VERSION_MAJOR == 3 && LLVM_VERSION_MINOR <= 5 if(LLVMLinkModules(wrap(clonedLib), wrap(mod), LLVMLinkerDestroySource, &errorMsg)) { -#else - if(LLVMLinkModules(wrap(clonedLib), wrap(mod), 0, &errorMsg)) { -#endif delete clonedLib; printf("Fatal Error: link the bitcode error:\n%s\n", errorMsg); return NULL; |