added LLVM_3_6 var

This commit is contained in:
Anton Mitrokhin
2014-07-30 11:50:15 +04:00
parent e044db016d
commit 725be222ac
15 changed files with 54 additions and 40 deletions

View File

@@ -66,7 +66,7 @@
#include <llvm/IR/Intrinsics.h>
#include <llvm/IR/DerivedTypes.h>
#endif
#if defined(LLVM_3_5)
#if defined(LLVM_3_5) || defined(LLVM_3_6)
#include <llvm/Linker/Linker.h>
#else
#include <llvm/Linker.h>
@@ -705,7 +705,7 @@ AddBitcodeToModule(const unsigned char *bitcode, int length,
llvm::Module *module, SymbolTable *symbolTable) {
llvm::StringRef sb = llvm::StringRef((char *)bitcode, length);
llvm::MemoryBuffer *bcBuf = llvm::MemoryBuffer::getMemBuffer(sb);
#if defined(LLVM_3_5)
#if defined(LLVM_3_5) || defined(LLVM_3_6)
llvm::ErrorOr<llvm::Module *> ModuleOrErr = llvm::parseBitcodeFile(bcBuf, *g->ctx);
if (std::error_code EC = ModuleOrErr.getError())
Error(SourcePos(), "Error parsing stdlib bitcode: %s", EC.message().c_str());
@@ -762,7 +762,7 @@ AddBitcodeToModule(const unsigned char *bitcode, int length,
// architecture and investigate what happened.
// Generally we allow library DataLayout to be subset of module
// DataLayout or library DataLayout to be empty.
#if defined(LLVM_3_5)
#if defined(LLVM_3_5) || defined(LLVM_3_6)
if (!VerifyDataLayoutCompatibility(module->getDataLayoutStr(),
bcModule->getDataLayoutStr())) {
Warning(SourcePos(), "Module DataLayout is incompatible with "