diff options
Diffstat (limited to 'lib/sanitizer_common/sanitizer_bitvector.h')
-rw-r--r-- | lib/sanitizer_common/sanitizer_bitvector.h | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/lib/sanitizer_common/sanitizer_bitvector.h b/lib/sanitizer_common/sanitizer_bitvector.h index da9082f0b..5def7e1e6 100644 --- a/lib/sanitizer_common/sanitizer_bitvector.h +++ b/lib/sanitizer_common/sanitizer_bitvector.h @@ -56,6 +56,8 @@ class BasicBitVector { return bits_ != old; } + void copyFrom(const BasicBitVector &v) { bits_ = v.bits_; } + // Returns true if 'this' intersects with 'v'. bool intersectsWith(const BasicBitVector &v) const { return bits_ & v.bits_; } @@ -165,6 +167,11 @@ class TwoLevelBitVector { return res; } + void copyFrom(const TwoLevelBitVector &v) { + clear(); + setUnion(v); + } + // Returns true if 'this' intersects with 'v'. bool intersectsWith(const TwoLevelBitVector &v) const { for (uptr i0 = 0; i0 < kLevel1Size; i0++) { |