[PATCH] D68318: Fix: Actually erase remove the elements from AssumeHandles

Aditya Kumar via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Wed Oct 2 10:33:47 PDT 2019


This revision was automatically updated to reflect the committed changes.
Closed by commit rL373494: Fix: Actually erase remove the elements from AssumeHandles (authored by hiraditya, committed by ).

Changed prior to commit:
  https://reviews.llvm.org/D68318?vs=222752&id=222868#toc

Repository:
  rL LLVM

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D68318/new/

https://reviews.llvm.org/D68318

Files:
  llvm/trunk/lib/Analysis/AssumptionCache.cpp


Index: llvm/trunk/lib/Analysis/AssumptionCache.cpp
===================================================================
--- llvm/trunk/lib/Analysis/AssumptionCache.cpp
+++ llvm/trunk/lib/Analysis/AssumptionCache.cpp
@@ -130,7 +130,10 @@
     if (AVI != AffectedValues.end())
       AffectedValues.erase(AVI);
   }
-  remove_if(AssumeHandles, [CI](WeakTrackingVH &VH) { return CI == VH; });
+
+  AssumeHandles.erase(
+      remove_if(AssumeHandles, [CI](WeakTrackingVH &VH) { return CI == VH; }),
+      AssumeHandles.end());
 }
 
 void AssumptionCache::AffectedValueCallbackVH::deleted() {


-------------- next part --------------
A non-text attachment was scrubbed...
Name: D68318.222868.patch
Type: text/x-patch
Size: 589 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20191002/d0450974/attachment.bin>


More information about the llvm-commits mailing list