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
This commit is contained in:
Dan Gohman
2009-04-01 18:45:54 +00:00
parent ef66abeaee
commit de551f91d8
13 changed files with 32 additions and 22 deletions
+2 -1
View File
@@ -16,6 +16,7 @@
#define LLVM_ADT_SPARSEBITVECTOR_H
#include <cassert>
#include <climits>
#include <cstring>
#include "llvm/Support/DataTypes.h"
#include "llvm/ADT/STLExtras.h"
@@ -44,7 +45,7 @@ struct SparseBitVectorElement
public:
typedef unsigned long BitWord;
enum {
BITWORD_SIZE = sizeof(BitWord) * 8,
BITWORD_SIZE = sizeof(BitWord) * CHAR_BIT,
BITWORDS_PER_ELEMENT = (ElementSize + BITWORD_SIZE - 1) / BITWORD_SIZE,
BITS_PER_ELEMENT = ElementSize
};