#include "llvm/ADT/FoldingSet.h"
#include "llvm/ADT/PointerIntPair.h"
#include "llvm/Bitcode/SerializationFwd.h"
-#include <climits>
using llvm::isa;
using llvm::cast;
using llvm::cast_or_null;
/// number of pointer-sized words we need to store this information,
/// based on the number of template arguments
static unsigned getNumPackedWords(unsigned NumArgs) {
- const unsigned BitsPerWord = sizeof(uintptr_t) * CHAR_BIT;
+ const unsigned BitsPerWord = sizeof(uintptr_t) * 8;
return NumArgs / BitsPerWord + (NumArgs % BitsPerWord > 0);
}
void
ClassTemplateSpecializationType::
packBooleanValues(unsigned NumArgs, bool *Values, uintptr_t *Words) {
- const unsigned BitsPerWord = sizeof(uintptr_t) * CHAR_BIT;
+ const unsigned BitsPerWord = sizeof(uintptr_t) * 8;
for (unsigned PW = 0, NumPackedWords = getNumPackedWords(NumArgs), Arg = 0;
PW != NumPackedWords; ++PW) {
}
bool ClassTemplateSpecializationType::isArgType(unsigned Arg) const {
- const unsigned BitsPerWord = sizeof(uintptr_t) * CHAR_BIT;
+ const unsigned BitsPerWord = sizeof(uintptr_t) * 8;
const uintptr_t *Data = reinterpret_cast<const uintptr_t *>(this + 1);
Data += Arg / BitsPerWord;
return (*Data >> ((NumArgs - Arg) % BitsPerWord - 1)) & 0x01;