Keep header file free of 'possible loss of data' warnings.
authorJeff Cohen <jeffc@jolt-lang.org>
Sun, 6 May 2007 03:23:14 +0000 (03:23 +0000)
committerJeff Cohen <jeffc@jolt-lang.org>
Sun, 6 May 2007 03:23:14 +0000 (03:23 +0000)
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@36832 91177308-0d34-0410-b5e6-96231b3b80d8

lib/Bitcode/Reader/BitcodeReader.h

index 2dcce0b6a8ed00433d3f6c6c47d3fd6a8046b43c..b70a99c05761992954bcee12c3ee473048e7a670 100644 (file)
@@ -154,7 +154,7 @@ private:
   bool getValueTypePair(SmallVector<uint64_t, 64> &Record, unsigned &Slot,
                         unsigned InstNum, Value *&ResVal) {
     if (Slot == Record.size()) return true;
-    unsigned ValNo = Record[Slot++];
+    unsigned ValNo = (unsigned)Record[Slot++];
     if (ValNo < InstNum) {
       // If this is not a forward reference, just return the value we already
       // have.
@@ -164,14 +164,14 @@ private:
       return true;
     }
     
-    unsigned TypeNo = Record[Slot++];
+    unsigned TypeNo = (unsigned)Record[Slot++];
     ResVal = getFnValueByID(ValNo, getTypeByID(TypeNo));
     return ResVal == 0;
   }
   bool getValue(SmallVector<uint64_t, 64> &Record, unsigned &Slot,
                 const Type *Ty, Value *&ResVal) {
     if (Slot == Record.size()) return true;
-    unsigned ValNo = Record[Slot++];
+    unsigned ValNo = (unsigned)Record[Slot++];
     ResVal = getFnValueByID(ValNo, Ty);
     return ResVal == 0;
   }