Fix to build with LLVM TOT after LLVM API change

This commit is contained in:
Matt Pharr
2011-10-11 09:26:45 -07:00
parent 7cd7ca82d6
commit 06d70376ea

View File

@@ -365,7 +365,11 @@ AddBitcodeToModule(const unsigned char *bitcode, int length,
bcModule->setTargetTriple(mTriple.str());
std::string(linkError);
if (llvm::Linker::LinkModules(module, bcModule, &linkError))
if (llvm::Linker::LinkModules(module, bcModule,
#if defined(LLVM_3_0) || defined(LLVM_3_0svn)
llvm::Linker::DestroySource,
#endif // LLVM_3_0
&linkError))
Error(SourcePos(), "Error linking stdlib bitcode: %s", linkError.c_str());
if (symbolTable != NULL)
lAddModuleSymbols(module, symbolTable);