Skip to content
Snippets Groups Projects
Commit f38ee634 authored by Chris Lattner's avatar Chris Lattner
Browse files

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

fixes a crash in LICM when processing povray.

llvm-svn: 16367
parent 6fa96650
No related branches found
No related tags found
No related merge requests found
...@@ -77,6 +77,10 @@ class AliasSet { ...@@ -77,6 +77,10 @@ class AliasSet {
void removeFromList() { void removeFromList() {
if (NextInList) NextInList->second.PrevInList = PrevInList; if (NextInList) NextInList->second.PrevInList = PrevInList;
*PrevInList = NextInList; *PrevInList = NextInList;
if (AS->PtrListEnd == &NextInList) {
AS->PtrListEnd = PrevInList;
assert(*AS->PtrListEnd == 0 && "List not terminated right!");
}
} }
}; };
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment