aboutsummaryrefslogtreecommitdiffstats
path: root/include
diff options
context:
space:
mode:
authorSebastian Redl <sebastian.redl@getdesigned.at>2009-06-29 17:12:06 +0000
committerSebastian Redl <sebastian.redl@getdesigned.at>2009-06-29 17:12:06 +0000
commit37c286c18128cce7f52654876a5a104150be4b79 (patch)
treea07a48348b404c047dcfb1292efadd264cc2d363 /include
parent3016af5a1d140eb4226f0574324990a6a61d2ec5 (diff)
downloadexternal_llvm-37c286c18128cce7f52654876a5a104150be4b79.zip
external_llvm-37c286c18128cce7f52654876a5a104150be4b79.tar.gz
external_llvm-37c286c18128cce7f52654876a5a104150be4b79.tar.bz2
Fix three MSVC 2008 warnings that completely clutter the build output.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@74430 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'include')
-rw-r--r--include/llvm/ADT/PointerUnion.h2
-rw-r--r--include/llvm/Bitcode/BitstreamReader.h4
2 files changed, 3 insertions, 3 deletions
diff --git a/include/llvm/ADT/PointerUnion.h b/include/llvm/ADT/PointerUnion.h
index b3baec1..1b36aee 100644
--- a/include/llvm/ADT/PointerUnion.h
+++ b/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/include/llvm/Bitcode/BitstreamReader.h b/include/llvm/Bitcode/BitstreamReader.h
index b7ae47d..28249ee 100644
--- a/include/llvm/Bitcode/BitstreamReader.h
+++ b/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;