diff options
Diffstat (limited to 'llvm/lib/Linker/LinkModules.cpp')
-rw-r--r-- | llvm/lib/Linker/LinkModules.cpp | 13 |
1 files changed, 7 insertions, 6 deletions
diff --git a/llvm/lib/Linker/LinkModules.cpp b/llvm/lib/Linker/LinkModules.cpp index f9f51bf17d95..17c3f09a23b7 100644 --- a/llvm/lib/Linker/LinkModules.cpp +++ b/llvm/lib/Linker/LinkModules.cpp @@ -14,7 +14,6 @@ #include "llvm-c/Linker.h" #include "llvm/ADT/SetVector.h" #include "llvm/IR/Comdat.h" -#include "llvm/IR/DiagnosticPrinter.h" #include "llvm/IR/GlobalValue.h" #include "llvm/IR/LLVMContext.h" #include "llvm/IR/Module.h" @@ -573,11 +572,13 @@ bool ModuleLinker::run() { // FIXME: Propagate Errors through to the caller instead of emitting // diagnostics. bool HasErrors = false; - if (Error E = Mover.move(std::move(SrcM), ValuesToLink.getArrayRef(), - [this](GlobalValue &GV, IRMover::ValueAdder Add) { - addLazyFor(GV, Add); - }, - /* IsPerformingImport */ false)) { + if (Error E = + Mover.move(std::move(SrcM), ValuesToLink.getArrayRef(), + IRMover::LazyCallback( + [this](GlobalValue &GV, IRMover::ValueAdder Add) { + addLazyFor(GV, Add); + }), + /* IsPerformingImport */ false)) { handleAllErrors(std::move(E), [&](ErrorInfoBase &EIB) { DstM.getContext().diagnose(LinkDiagnosticInfo(DS_Error, EIB.message())); HasErrors = true; |