mirror of
https://github.com/ldc-developers/ldc.git
synced 2025-04-30 23:20:40 +03:00
Fix compile error with LLVM 3.6.
The llvm::Linker class now uses diagnostic messages.
This commit is contained in:
parent
332480460c
commit
e5745f5bb1
2 changed files with 14 additions and 0 deletions
|
@ -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);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue