mirror of
https://github.com/RPCS3/llvm-mirror.git
synced 2024-11-24 11:42:57 +01:00
Fix intersectWithComplement bug noticed by Curtis Dunham
Optimize |= case for empty RHS llvm-svn: 42629
This commit is contained in:
parent
6fd2606ff5
commit
7cb8b28613
@ -580,8 +580,8 @@ public:
|
||||
ElementListIter Iter1 = Elements.begin();
|
||||
ElementListConstIter Iter2 = RHS.Elements.begin();
|
||||
|
||||
// Check if both bitmaps are empty
|
||||
if (Elements.empty() && RHS.Elements.empty())
|
||||
// If RHS is empty, we are done
|
||||
if (RHS.Elements.empty())
|
||||
return false;
|
||||
|
||||
while (Iter2 != RHS.Elements.end()) {
|
||||
@ -671,9 +671,7 @@ public:
|
||||
}
|
||||
++Iter2;
|
||||
} else {
|
||||
ElementListIter IterTmp = Iter1;
|
||||
++Iter1;
|
||||
Elements.erase(IterTmp);
|
||||
}
|
||||
}
|
||||
CurrElementIter = Elements.begin();
|
||||
|
Loading…
Reference in New Issue
Block a user