Merge pull request #890 from Vsevolod-Livinskij/fix_for_trunk

Fix for trunk
This commit is contained in:
Dmitry Babokin
2014-10-30 12:25:09 -07:00
2 changed files with 9 additions and 2 deletions

View File

@@ -877,10 +877,14 @@ AddBitcodeToModule(const unsigned char *bitcode, int length,
bcModule->setDataLayout(module->getDataLayout());
std::string(linkError);
if (llvm::Linker::LinkModules(module, bcModule,
llvm::Linker::DestroySource,
if (llvm::Linker::LinkModules(module, bcModule
#if defined(LLVM_3_2) || defined(LLVM_3_3) || defined(LLVM_3_4) || defined(LLVM_3_5)
, llvm::Linker::DestroySource,
&linkError))
Error(SourcePos(), "Error linking stdlib bitcode: %s", linkError.c_str());
#else // LLVM 3.6+
)) {}
#endif
lSetInternalFunctions(module);
if (symbolTable != NULL)
lAddModuleSymbols(module, symbolTable);

View File

@@ -103,6 +103,9 @@
#include <llvm/Analysis/Passes.h>
#include <llvm/Support/raw_ostream.h>
#include <llvm/Support/Dwarf.h>
#if !defined(LLVM_3_2) && !defined(LLVM_3_5) && !defined(LLVM_3_4) && !defined(LLVM_3_5)
#include <llvm/IR/IntrinsicInst.h>
#endif
#ifdef ISPC_IS_LINUX
#include <alloca.h>
#elif defined(ISPC_IS_WINDOWS)