From 650c938c41adc95e0935c75d7ed4349c46d280d1 Mon Sep 17 00:00:00 2001 From: Jeff Cohen Date: Sun, 6 May 2007 03:23:14 +0000 Subject: [PATCH] Keep header file free of 'possible loss of data' warnings. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@36832 91177308-0d34-0410-b5e6-96231b3b80d8 --- lib/Bitcode/Reader/BitcodeReader.h | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/lib/Bitcode/Reader/BitcodeReader.h b/lib/Bitcode/Reader/BitcodeReader.h index 2dcce0b6a8e..b70a99c0576 100644 --- a/lib/Bitcode/Reader/BitcodeReader.h +++ b/lib/Bitcode/Reader/BitcodeReader.h @@ -154,7 +154,7 @@ private: bool getValueTypePair(SmallVector &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 &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; }