[lld] r330597 - [ELF] - Simplify. NFC.

George Rimar via llvm-commits llvm-commits at lists.llvm.org
Mon Apr 23 07:41:49 PDT 2018


Author: grimar
Date: Mon Apr 23 07:41:49 2018
New Revision: 330597

URL: http://llvm.org/viewvc/llvm-project?rev=330597&view=rev
Log:
[ELF] - Simplify. NFC.

Modified:
    lld/trunk/ELF/CallGraphSort.cpp

Modified: lld/trunk/ELF/CallGraphSort.cpp
URL: http://llvm.org/viewvc/llvm-project/lld/trunk/ELF/CallGraphSort.cpp?rev=330597&r1=330596&r2=330597&view=diff
==============================================================================
--- lld/trunk/ELF/CallGraphSort.cpp (original)
+++ lld/trunk/ELF/CallGraphSort.cpp Mon Apr 23 07:41:49 2018
@@ -214,11 +214,9 @@ void CallGraphSort::groupClusters() {
   }
 
   // Remove empty or dead nodes. Invalidates all cluster indices.
-  Clusters.erase(std::remove_if(Clusters.begin(), Clusters.end(),
-                                [](const Cluster &C) {
-                                  return C.Size == 0 || C.Sections.empty();
-                                }),
-                 Clusters.end());
+  llvm::erase_if(Clusters, [](const Cluster &C) {
+    return C.Size == 0 || C.Sections.empty();
+  });
 
   // Sort by density.
   std::sort(Clusters.begin(), Clusters.end(),




More information about the llvm-commits mailing list