diff options
| author | Sebastian Redl <sebastian.redl@getdesigned.at> | 2009-06-29 17:12:06 +0000 |
|---|---|---|
| committer | Sebastian Redl <sebastian.redl@getdesigned.at> | 2009-06-29 17:12:06 +0000 |
| commit | 125758143850e11a528102aac4bdc8f4a5930d73 (patch) | |
| tree | 457ed6e1e7289f8e089a894a564f5b3626f8ea8e | |
| parent | 46b56ffae3f5fb97918215b2a645762e0ac60995 (diff) | |
| download | bcm5719-llvm-125758143850e11a528102aac4bdc8f4a5930d73.tar.gz bcm5719-llvm-125758143850e11a528102aac4bdc8f4a5930d73.zip | |
Fix three MSVC 2008 warnings that completely clutter the build output.
llvm-svn: 74430
| -rw-r--r-- | llvm/include/llvm/ADT/PointerUnion.h | 2 | ||||
| -rw-r--r-- | llvm/include/llvm/Bitcode/BitstreamReader.h | 4 |
2 files changed, 3 insertions, 3 deletions
diff --git a/llvm/include/llvm/ADT/PointerUnion.h b/llvm/include/llvm/ADT/PointerUnion.h index b3baec1ff37..1b36aeea793 100644 --- a/llvm/include/llvm/ADT/PointerUnion.h +++ b/llvm/include/llvm/ADT/PointerUnion.h @@ -89,7 +89,7 @@ namespace llvm { 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 diff --git a/llvm/include/llvm/Bitcode/BitstreamReader.h b/llvm/include/llvm/Bitcode/BitstreamReader.h index b7ae47d1e62..28249eec0b0 100644 --- a/llvm/include/llvm/Bitcode/BitstreamReader.h +++ b/llvm/include/llvm/Bitcode/BitstreamReader.h @@ -324,7 +324,7 @@ public: 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; @@ -332,7 +332,7 @@ public: 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; |

