mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2024-12-14 11:32:34 +00:00
Fix intersectWithComplement bug noticed by Curtis Dunham
Optimize |= case for empty RHS git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@42629 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
parent
eca18214bb
commit
ad92c633c7
@ -580,8 +580,8 @@ public:
|
|||||||
ElementListIter Iter1 = Elements.begin();
|
ElementListIter Iter1 = Elements.begin();
|
||||||
ElementListConstIter Iter2 = RHS.Elements.begin();
|
ElementListConstIter Iter2 = RHS.Elements.begin();
|
||||||
|
|
||||||
// Check if both bitmaps are empty
|
// If RHS is empty, we are done
|
||||||
if (Elements.empty() && RHS.Elements.empty())
|
if (RHS.Elements.empty())
|
||||||
return false;
|
return false;
|
||||||
|
|
||||||
while (Iter2 != RHS.Elements.end()) {
|
while (Iter2 != RHS.Elements.end()) {
|
||||||
@ -671,9 +671,7 @@ public:
|
|||||||
}
|
}
|
||||||
++Iter2;
|
++Iter2;
|
||||||
} else {
|
} else {
|
||||||
ElementListIter IterTmp = Iter1;
|
|
||||||
++Iter1;
|
++Iter1;
|
||||||
Elements.erase(IterTmp);
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
CurrElementIter = Elements.begin();
|
CurrElementIter = Elements.begin();
|
||||||
|
Loading…
Reference in New Issue
Block a user