[PATCH] D78676: llvm: IPO: handle IRMover error handling, bug #45636
Sergei Trofimovich via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Wed Apr 22 14:42:00 PDT 2020
trofi created this revision.
trofi added a reviewer: lattner.
Herald added subscribers: llvm-commits, hiraditya.
Herald added a project: LLVM.
Missing error mangling is noticed in
https://bugs.llvm.org/show_bug.cgi?id=45636
where inconsistent profiling input caused
llvm/lld to crash as:
Program aborted due to an unhandled Error:
linking module flags 'ProfileSummary':
IDs have conflicting values in 'Mutex_posix.o' and 'nsBrowserApp.o'
The change does not change the fact that LLVM crashes
but changes error output to say what was incorrect:
LLVM ERROR: Function Import: link error:
linking module flags 'ProfileSummary':
IDs have conflicting values in 'Mutex_posix.o' and 'nsBrowserApp.o'
Actual crash has yet to be fixed.
Repository:
rG LLVM Github Monorepo
https://reviews.llvm.org/D78676
Files:
llvm/lib/Transforms/IPO/FunctionImport.cpp
Index: llvm/lib/Transforms/IPO/FunctionImport.cpp
===================================================================
--- llvm/lib/Transforms/IPO/FunctionImport.cpp
+++ llvm/lib/Transforms/IPO/FunctionImport.cpp
@@ -1243,10 +1243,12 @@
<< " from " << SrcModule->getSourceFileName() << "\n";
}
- if (Mover.move(std::move(SrcModule), GlobalsToImport.getArrayRef(),
- [](GlobalValue &, IRMover::ValueAdder) {},
- /*IsPerformingImport=*/true))
- report_fatal_error("Function Import: link error");
+ if (Error Err = Mover.move(
+ std::move(SrcModule), GlobalsToImport.getArrayRef(),
+ [](GlobalValue &, IRMover::ValueAdder) {},
+ /*IsPerformingImport=*/true))
+ report_fatal_error("Function Import: link error: " +
+ toString(std::move(Err)));
ImportedCount += GlobalsToImport.size();
NumImportedModules++;
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D78676.259401.patch
Type: text/x-patch
Size: 946 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20200422/d50bbb26/attachment.bin>
More information about the llvm-commits
mailing list