[llvm-commits] CVS: llvm/lib/Bitcode/Reader/BitcodeReader.h

Jeff Cohen jeffc at jolt-lang.org
Sat May 5 20:23:33 PDT 2007



Changes in directory llvm/lib/Bitcode/Reader:

BitcodeReader.h updated: 1.18 -> 1.19
---
Log message:

Keep header file free of 'possible loss of data' warnings.

---
Diffs of the changes:  (+3 -3)

 BitcodeReader.h |    6 +++---
 1 files changed, 3 insertions(+), 3 deletions(-)


Index: llvm/lib/Bitcode/Reader/BitcodeReader.h
diff -u llvm/lib/Bitcode/Reader/BitcodeReader.h:1.18 llvm/lib/Bitcode/Reader/BitcodeReader.h:1.19
--- llvm/lib/Bitcode/Reader/BitcodeReader.h:1.18	Sat May  5 19:00:00 2007
+++ llvm/lib/Bitcode/Reader/BitcodeReader.h	Sat May  5 22:23:14 2007
@@ -154,7 +154,7 @@
   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 @@
       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;
   }






More information about the llvm-commits mailing list