[ELF] - Simplify. NFC.
authorGeorge Rimar <grimar@accesssoftek.com>
Mon, 23 Apr 2018 14:41:49 +0000 (14:41 +0000)
committerGeorge Rimar <grimar@accesssoftek.com>
Mon, 23 Apr 2018 14:41:49 +0000 (14:41 +0000)
llvm-svn: 330597

lld/ELF/CallGraphSort.cpp

index 6ac0e12..3d9558c 100644 (file)
@@ -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(),