[PATCH] D102399: Fix an issue where opt crashed when loading a non-existent plugin library
ZhouPeng via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Thu May 13 06:14:36 PDT 2021
pzzp created this revision.
pzzp added a reviewer: LLVM.
pzzp requested review of this revision.
Herald added a project: LLVM.
Herald added a subscriber: llvm-commits.
The function runPassPipeline forgets to consume the error of load plugin library but just print an message, so it ends up with an unexpected assert failure when LLVM_ENABLE_ABI_BREAKING_CHECKS enabled.
Repository:
rG LLVM Github Monorepo
https://reviews.llvm.org/D102399
Files:
llvm/tools/opt/NewPMDriver.cpp
Index: llvm/tools/opt/NewPMDriver.cpp
===================================================================
--- llvm/tools/opt/NewPMDriver.cpp
+++ llvm/tools/opt/NewPMDriver.cpp
@@ -304,6 +304,7 @@
if (!PassPlugin) {
errs() << "Failed to load passes from '" << PluginFN
<< "'. Request ignored.\n";
+ consumeError(PassPlugin.takeError());
continue;
}
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D102399.345104.patch
Type: text/x-patch
Size: 393 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20210513/7b3e513f/attachment.bin>
More information about the llvm-commits
mailing list