diff options
author | Kostya Serebryany <kcc@google.com> | 2014-02-13 09:52:15 +0000 |
---|---|---|
committer | Kostya Serebryany <kcc@google.com> | 2014-02-13 09:52:15 +0000 |
commit | 361082bac8b483a9e962abefc3627d5867d779eb (patch) | |
tree | 33d57e1ce0190004d891417b393b044daa7f1c7e /lib/sanitizer_common/sanitizer_bitvector.h | |
parent | 56f859072ba1d194373654fca84b941ffb035c84 (diff) |
[sanitizer] findPath for deadlock detector
git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@201306 91177308-0d34-0410-b5e6-96231b3b80d8
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++) { |