[llvm] [MemProf] Use remove_if to erase MapVector elements in bulk (PR #94269)
    Kazu Hirata via llvm-commits 
    llvm-commits at lists.llvm.org
       
    Mon Jun  3 18:51:38 PDT 2024
    
    
  
================
@@ -1694,11 +1682,10 @@ void CallsiteContextGraph<DerivedCCG, FuncTy,
   MapVector<CallInfo, ContextNode *> TailCallToContextNodeMap;
 
   for (auto Entry = NonAllocationCallToContextNodeMap.begin();
-       Entry != NonAllocationCallToContextNodeMap.end();) {
+       Entry != NonAllocationCallToContextNodeMap.end(); Entry++) {
----------------
kazutakahirata wrote:
While you are here, may I suggest a range-based for loop here?
https://github.com/llvm/llvm-project/pull/94269
    
    
More information about the llvm-commits
mailing list