aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--include/llvm/Analysis/AliasSetTracker.h4
1 files changed, 4 insertions, 0 deletions
diff --git a/include/llvm/Analysis/AliasSetTracker.h b/include/llvm/Analysis/AliasSetTracker.h
index 6a6f0168d2..fe3e60c62b 100644
--- a/include/llvm/Analysis/AliasSetTracker.h
+++ b/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!");
+ }
}
};