mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2024-08-23 02:29:18 +00:00
Fix a bug in BitVector.h. All assignment operations (except the usual
assignment operator) were returning a copy of the bit vector, instead of a reference! This old semantics probably did not meet the expectations. With this patch, chained assignments happen to the right object. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@63012 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
parent
c4b1abd81e
commit
8d8a0c36b7
@ -286,7 +286,7 @@ public:
|
||||
}
|
||||
|
||||
// Intersection, union, disjoint union.
|
||||
BitVector operator&=(const BitVector &RHS) {
|
||||
BitVector &operator&=(const BitVector &RHS) {
|
||||
unsigned ThisWords = NumBitWords(size());
|
||||
unsigned RHSWords = NumBitWords(RHS.size());
|
||||
unsigned i;
|
||||
@ -302,14 +302,14 @@ public:
|
||||
return *this;
|
||||
}
|
||||
|
||||
BitVector operator|=(const BitVector &RHS) {
|
||||
BitVector &operator|=(const BitVector &RHS) {
|
||||
assert(Size == RHS.Size && "Illegal operation!");
|
||||
for (unsigned i = 0; i < NumBitWords(size()); ++i)
|
||||
Bits[i] |= RHS.Bits[i];
|
||||
return *this;
|
||||
}
|
||||
|
||||
BitVector operator^=(const BitVector &RHS) {
|
||||
BitVector &operator^=(const BitVector &RHS) {
|
||||
assert(Size == RHS.Size && "Illegal operation!");
|
||||
for (unsigned i = 0; i < NumBitWords(size()); ++i)
|
||||
Bits[i] ^= RHS.Bits[i];
|
||||
|
Loading…
Reference in New Issue
Block a user