summaryrefslogtreecommitdiff
path: root/include/llvm/ADT/BitVector.h
diff options
context:
space:
mode:
authorDan Gohman <gohman@apple.com>2010-04-30 20:50:28 +0000
committerDan Gohman <gohman@apple.com>2010-04-30 20:50:28 +0000
commit3f5e91565273e3f4639d37ee5a5b856699e8c9e5 (patch)
treef5ba807a1f87467d382a9ff038f79937f895bb8c /include/llvm/ADT/BitVector.h
parent8fcd418d6e47278658cbab851be25400b1402e9a (diff)
downloadllvm-3f5e91565273e3f4639d37ee5a5b856699e8c9e5.tar.gz
llvm-3f5e91565273e3f4639d37ee5a5b856699e8c9e5.tar.bz2
llvm-3f5e91565273e3f4639d37ee5a5b856699e8c9e5.tar.xz
Update BitVectorTest.cpp to stay in sync with SmallBitVectorTest.cpp,
and fix a bug in BitVector's reference proxy class which this exposed. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@102768 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'include/llvm/ADT/BitVector.h')
-rw-r--r--include/llvm/ADT/BitVector.h5
1 files changed, 5 insertions, 0 deletions
diff --git a/include/llvm/ADT/BitVector.h b/include/llvm/ADT/BitVector.h
index 3a86b0d343..9dcb9e106f 100644
--- a/include/llvm/ADT/BitVector.h
+++ b/include/llvm/ADT/BitVector.h
@@ -49,6 +49,11 @@ public:
~reference() {}
+ reference &operator=(reference t) {
+ *this = bool(t);
+ return *this;
+ }
+
reference& operator=(bool t) {
if (t)
*WordRef |= 1L << BitPos;