int is() const {
int TyNo = ::llvm::getPointerUnionTypeNum<PT1, PT2>((T*)0);
assert(TyNo != -1 && "Type query could never succeed on PointerUnion!");
int is() const {
int TyNo = ::llvm::getPointerUnionTypeNum<PT1, PT2>((T*)0);
assert(TyNo != -1 && "Type query could never succeed on PointerUnion!");
- return Val.getInt() == TyNo;
+ return static_cast<int>(Val.getInt()) == TyNo;
}
/// get<T>() - Return the value of the specified pointer type. If the
}
/// get<T>() - Return the value of the specified pointer type. If the
uint64_t ReadVBR64(unsigned NumBits) {
uint64_t Piece = Read(NumBits);
uint64_t ReadVBR64(unsigned NumBits) {
uint64_t Piece = Read(NumBits);
- if ((Piece & (1U << (NumBits-1))) == 0)
+ if ((Piece & (uint64_t(1) << (NumBits-1))) == 0)
return Piece;
uint64_t Result = 0;
return Piece;
uint64_t Result = 0;
while (1) {
Result |= (Piece & ((1U << (NumBits-1))-1)) << NextBit;
while (1) {
Result |= (Piece & ((1U << (NumBits-1))-1)) << NextBit;
- if ((Piece & (1U << (NumBits-1))) == 0)
+ if ((Piece & (uint64_t(1) << (NumBits-1))) == 0)
return Result;
NextBit += NumBits-1;
return Result;
NextBit += NumBits-1;