summaryrefslogtreecommitdiff
path: root/include/llvm/ADT/BitVector.h
diff options
context:
space:
mode:
Diffstat (limited to 'include/llvm/ADT/BitVector.h')
-rw-r--r--include/llvm/ADT/BitVector.h3
1 files changed, 2 insertions, 1 deletions
diff --git a/include/llvm/ADT/BitVector.h b/include/llvm/ADT/BitVector.h
index 23fde26e14..9c046efaad 100644
--- a/include/llvm/ADT/BitVector.h
+++ b/include/llvm/ADT/BitVector.h
@@ -17,6 +17,7 @@
#include "llvm/Support/MathExtras.h"
#include <algorithm>
#include <cassert>
+#include <climits>
#include <cstring>
namespace llvm {
@@ -24,7 +25,7 @@ namespace llvm {
class BitVector {
typedef unsigned long BitWord;
- enum { BITWORD_SIZE = (unsigned)sizeof(BitWord) * 8 };
+ enum { BITWORD_SIZE = (unsigned)sizeof(BitWord) * CHAR_BIT };
BitWord *Bits; // Actual bits.
unsigned Size; // Size of bitvector in bits.