From f38ee634230a7acf95d9a42a7867ceca11754576 Mon Sep 17 00:00:00 2001 From: Chris Lattner Date: Wed, 15 Sep 2004 17:00:41 +0000 Subject: [PATCH] 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 --- llvm/include/llvm/Analysis/AliasSetTracker.h | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/llvm/include/llvm/Analysis/AliasSetTracker.h b/llvm/include/llvm/Analysis/AliasSetTracker.h index 6a6f0168d265..fe3e60c62bbd 100644 --- a/llvm/include/llvm/Analysis/AliasSetTracker.h +++ b/llvm/include/llvm/Analysis/AliasSetTracker.h @@ -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!"); + } } }; -- GitLab