summaryrefslogtreecommitdiff
path: root/include/llvm/ADT/BitVector.h
diff options
context:
space:
mode:
authorEvan Cheng <evan.cheng@apple.com>2007-02-15 19:03:23 +0000
committerEvan Cheng <evan.cheng@apple.com>2007-02-15 19:03:23 +0000
commit057f8e084515ca8e10eac5c37c8a9485b844343c (patch)
treef63743f493f0b1befe9de18e7d0e06385e9885b6 /include/llvm/ADT/BitVector.h
parent5f92ce4696eaeca9d8b99b1a1fa784e78479d516 (diff)
downloadllvm-057f8e084515ca8e10eac5c37c8a9485b844343c.tar.gz
llvm-057f8e084515ca8e10eac5c37c8a9485b844343c.tar.bz2
llvm-057f8e084515ca8e10eac5c37c8a9485b844343c.tar.xz
1 -> 1L since BitWord has type unsigned long.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@34312 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'include/llvm/ADT/BitVector.h')
-rw-r--r--include/llvm/ADT/BitVector.h18
1 files changed, 9 insertions, 9 deletions
diff --git a/include/llvm/ADT/BitVector.h b/include/llvm/ADT/BitVector.h
index 0315172ebd..94cbf09621 100644
--- a/include/llvm/ADT/BitVector.h
+++ b/include/llvm/ADT/BitVector.h
@@ -47,22 +47,22 @@ public:
reference& operator=(bool t) {
if (t)
- *WordRef |= 1 << BitPos;
+ *WordRef |= 1L << BitPos;
else
- *WordRef &= ~(1 << BitPos);
+ *WordRef &= ~(1L << BitPos);
return *this;
}
reference& operator=(const reference& rhs) {
if (*rhs.WordRef & (1 << rhs.BitPos))
- *WordRef |= 1 << BitPos;
+ *WordRef |= 1L << BitPos;
else
- *WordRef &= ~(1 << BitPos);
+ *WordRef &= ~(1L << BitPos);
return *this;
}
operator bool() const {
- return (*WordRef) & (1 << BitPos);
+ return (*WordRef) & (1L << BitPos);
}
};
@@ -196,7 +196,7 @@ public:
}
BitVector &set(unsigned Idx) {
- Bits[Idx / BITS_PER_WORD] |= 1 << (Idx % BITS_PER_WORD);
+ Bits[Idx / BITS_PER_WORD] |= 1L << (Idx % BITS_PER_WORD);
return *this;
}
@@ -207,7 +207,7 @@ public:
}
BitVector &reset(unsigned Idx) {
- Bits[Idx / BITS_PER_WORD] &= ~(1 << (Idx % BITS_PER_WORD));
+ Bits[Idx / BITS_PER_WORD] &= ~(1L << (Idx % BITS_PER_WORD));
return *this;
}
@@ -219,7 +219,7 @@ public:
}
BitVector &flip(unsigned Idx) {
- Bits[Idx / BITS_PER_WORD] ^= 1 << (Idx % BITS_PER_WORD);
+ Bits[Idx / BITS_PER_WORD] ^= 1L << (Idx % BITS_PER_WORD);
return *this;
}
@@ -234,7 +234,7 @@ public:
}
bool operator[](unsigned Idx) const {
- BitWord Mask = 1 << (Idx % BITS_PER_WORD);
+ BitWord Mask = 1L << (Idx % BITS_PER_WORD);
return (Bits[Idx / BITS_PER_WORD] & Mask) != 0;
}