summaryrefslogtreecommitdiffstats
path: root/clang/lib/Serialization/ModuleManager.cpp
diff options
context:
space:
mode:
authorChandler Carruth <chandlerc@gmail.com>2014-03-03 19:36:27 +0000
committerChandler Carruth <chandlerc@gmail.com>2014-03-03 19:36:27 +0000
commitb55d0226b7139648941466d6e6dc08a05e3902e7 (patch)
tree1e6804c36e08c794009d387b700d582986ed5163 /clang/lib/Serialization/ModuleManager.cpp
parent23f16b1ceb332849e0817a07c328cc59abd01132 (diff)
downloadbcm5719-llvm-b55d0226b7139648941466d6e6dc08a05e3902e7.tar.gz
bcm5719-llvm-b55d0226b7139648941466d6e6dc08a05e3902e7.zip
[C++11] Remove a now unnecessary use of std::function for a remove_if
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. llvm-svn: 202744
Diffstat (limited to 'clang/lib/Serialization/ModuleManager.cpp')
-rw-r--r--clang/lib/Serialization/ModuleManager.cpp7
1 files changed, 3 insertions, 4 deletions
diff --git a/clang/lib/Serialization/ModuleManager.cpp b/clang/lib/Serialization/ModuleManager.cpp
index 201f8fadea6..3513eba8602 100644
--- a/clang/lib/Serialization/ModuleManager.cpp
+++ b/clang/lib/Serialization/ModuleManager.cpp
@@ -143,11 +143,10 @@ void ModuleManager::removeModules(ModuleIterator first, ModuleIterator last,
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.
OpenPOWER on IntegriCloud