From de551f91d8816632a76a065084caab9fab6aacff Mon Sep 17 00:00:00 2001 From: Dan Gohman Date: Wed, 1 Apr 2009 18:45:54 +0000 Subject: Use CHAR_BIT instead of hard-coding 8 in several places where it is appropriate. This helps visually differentiate host-oriented calculations from target-oriented calculations. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@68227 91177308-0d34-0410-b5e6-96231b3b80d8 --- include/llvm/ADT/BitVector.h | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'include/llvm/ADT/BitVector.h') 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 #include +#include #include 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. -- cgit v1.2.3-70-g09d2