From: Nick Lewycky Date: Sun, 17 Sep 2006 16:23:36 +0000 (+0000) Subject: Fix PR912. The input to erase() must not be a reference to the data X-Git-Url: http://demsky.eecs.uci.edu/git/?a=commitdiff_plain;h=38c7c42a32b319bc2a603fe6d4e3289b5451c150;p=oota-llvm.git 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 6d09b65c6b8..39f01b613ec 100644 --- a/lib/Analysis/AliasSetTracker.cpp +++ b/lib/Analysis/AliasSetTracker.cpp @@ -374,7 +374,8 @@ void AliasSetTracker::remove(AliasSet &AS) { ++NumRefs; // Finally, remove the entry. - PointerMap.erase(P->first); + Value *Remove = P->first; + PointerMap.erase(Remove); } // Stop using the alias set, removing it.