mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2024-08-19 04:29:21 +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();
|
||||
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