Make sure to update the list end when an element is removed from it. This

fixes a crash in LICM when processing povray.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@16367 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
Chris Lattner 2004-09-15 17:00:41 +00:00
parent 3080b605d7
commit 7e0e9c635f

View File

@ -77,6 +77,10 @@ class AliasSet {
void removeFromList() {
if (NextInList) NextInList->second.PrevInList = PrevInList;
*PrevInList = NextInList;
if (AS->PtrListEnd == &NextInList) {
AS->PtrListEnd = PrevInList;
assert(*AS->PtrListEnd == 0 && "List not terminated right!");
}
}
};