summaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
authorChris Lattner <sabre@nondot.org>2006-06-27 23:56:13 +0000
committerChris Lattner <sabre@nondot.org>2006-06-27 23:56:13 +0000
commit356d8c24997d33a83482c2d20c31b106a3b8db08 (patch)
tree1e4d4a7f2efa641484b973e1afbed4574657c202 /lib
parentf2998574961514a156ea5defe3aa58fdcc9805b8 (diff)
downloadllvm-356d8c24997d33a83482c2d20c31b106a3b8db08.tar.gz
llvm-356d8c24997d33a83482c2d20c31b106a3b8db08.tar.bz2
llvm-356d8c24997d33a83482c2d20c31b106a3b8db08.tar.xz
Handle alias sets that have been unified, and thus can have other references
to them. This fixes a regression in my previous checkin. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@28951 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib')
-rw-r--r--lib/Analysis/AliasSetTracker.cpp6
1 files changed, 3 insertions, 3 deletions
diff --git a/lib/Analysis/AliasSetTracker.cpp b/lib/Analysis/AliasSetTracker.cpp
index f805a43b4e..16c652117f 100644
--- a/lib/Analysis/AliasSetTracker.cpp
+++ b/lib/Analysis/AliasSetTracker.cpp
@@ -378,9 +378,9 @@ void AliasSetTracker::remove(AliasSet &AS) {
}
// Stop using the alias set, removing it.
- assert(AS.RefCount == NumRefs);
- AS.RefCount = 0;
- AS.removeFromTracker(*this);
+ AS.RefCount -= NumRefs;
+ if (AS.RefCount == 0)
+ AS.removeFromTracker(*this);
}
bool AliasSetTracker::remove(Value *Ptr, unsigned Size) {