Fix PR912. The input to erase() must not be a reference to the data
being erased.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@30442 91177308-0d34-0410-b5e6-96231b3b80d8
diff --git a/lib/Analysis/AliasSetTracker.cpp b/lib/Analysis/AliasSetTracker.cpp
index 6d09b65..39f01b6 100644
--- a/lib/Analysis/AliasSetTracker.cpp
+++ b/lib/Analysis/AliasSetTracker.cpp
@@ -374,7 +374,8 @@
     ++NumRefs;
 
     // Finally, remove the entry.
-    PointerMap.erase(P->first);
+    Value *Remove = P->first;
+    PointerMap.erase(Remove);
   }
   
   // Stop using the alias set, removing it.