Fix compile error with LLVM 3.6.

The llvm::Linker class now uses diagnostic messages.
This commit is contained in:
kai 2014-10-25 18:11:49 +02:00
parent 332480460c
commit e5745f5bb1
2 changed files with 14 additions and 0 deletions

View file

@ -403,6 +403,9 @@ LLFunction* DtoInlineIRFunction(FuncDeclaration* fdecl)
(std::string(err.getColumnNo(), ' ') + '^').c_str(),
errstr.c_str(), stream.str().c_str());
#if LDC_LLVM_VER >= 306
llvm::Linker(gIR->module).linkInModule(m.get());
#else
#if LDC_LLVM_VER >= 303
std::string errstr2 = "";
#if LDC_LLVM_VER >= 306
@ -413,6 +416,7 @@ LLFunction* DtoInlineIRFunction(FuncDeclaration* fdecl)
if(errstr2 != "")
error(tinst->loc,
"Error when linking in llvm inline ir: %s", errstr2.c_str());
#endif
#endif
LLFunction* fun = gIR->module->getFunction(mangled_name);