fix a potentially serious bug in AliasSet::removeCallSite
[oota-llvm.git] / include / llvm / Analysis / AliasSetTracker.h
index e844d10dda03b0ed95c837a2cad04eca344d7740..4efa3963b66aea263564f64dc055ffb351a412d2 100644 (file)
@@ -259,6 +259,7 @@ private:
       if (CallSites[i] == CS.getInstruction()) {
         CallSites[i] = CallSites.back();
         CallSites.pop_back();
+        --i; --e;  // Revisit the moved entry.
       }
   }
   void setVolatile() { Volatile = true; }