predicate. The wrapper used by SetVector was erroneously requiring an
adaptable predicate. It has been fixed and we really don't want to
require an indirect call for every predicate evaluation.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@202744
91177308-0d34-0410-b5e6-
96231b3b80d8
llvm::SmallPtrSet<ModuleFile *, 4> victimSet(first, last);
// Remove any references to the now-destroyed modules.
- std::function<bool(ModuleFile *)> checkInSet = [&](ModuleFile *MF) {
- return victimSet.count(MF);
- };
for (unsigned i = 0, n = Chain.size(); i != n; ++i) {
- Chain[i]->ImportedBy.remove_if(checkInSet);
+ Chain[i]->ImportedBy.remove_if([&](ModuleFile *MF) {
+ return victimSet.count(MF);
+ });
}
// Delete the modules and erase them from the various structures.