[PATCH] D71959: [PassManagerBuilder] Remove global extension when a plugin is unloaded
Mehdi AMINI via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Sat Jan 25 20:45:00 PST 2020
mehdi_amini accepted this revision.
mehdi_amini added inline comments.
This revision is now accepted and ready to land.
================
Comment at: llvm/lib/Transforms/IPO/PassManagerBuilder.cpp:213
+ // has already been destroyed; doing so should not generate an error.
+ if (GlobalExtensions.isConstructed()) {
+ auto GlobalExtension =
----------------
Nit: please use early-exit.
================
Comment at: llvm/lib/Transforms/IPO/PassManagerBuilder.cpp:215
+ auto GlobalExtension =
+ std::find_if(GlobalExtensions->begin(), GlobalExtensions->end(),
+ [ExtensionID](const auto &elem) {
----------------
`llvm::find_if(GlobalExtensions, ...`
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D71959/new/
https://reviews.llvm.org/D71959
More information about the llvm-commits
mailing list