X-Git-Url: http://demsky.eecs.uci.edu/git/?a=blobdiff_plain;f=include%2Fllvm%2FBitcode%2FBitstreamReader.h;h=3b7a9b61e6aaab5d8a14ae85cb9e20e08b2f83ad;hb=5eca075b74d62c621b160aa216b4cd50829a2cc7;hp=456f1ce5a120c5c2cb9cd72c634d5671c7c9e62f;hpb=7ed47a13356daed2a34cd2209a31f92552e3bdd8;p=oota-llvm.git diff --git a/include/llvm/Bitcode/BitstreamReader.h b/include/llvm/Bitcode/BitstreamReader.h index 456f1ce5a12..3b7a9b61e6a 100644 --- a/include/llvm/Bitcode/BitstreamReader.h +++ b/include/llvm/Bitcode/BitstreamReader.h @@ -85,12 +85,15 @@ public: ~BitstreamReader() { // Abbrevs could still exist if the stream was broken. If so, don't leak // them. - for (unsigned i = 0, e = CurAbbrevs.size(); i != e; ++i) + for (unsigned i = 0, e = static_cast(CurAbbrevs.size()); + i != e; ++i) CurAbbrevs[i]->dropRef(); - for (unsigned S = 0, e = BlockScope.size(); S != e; ++S) { + for (unsigned S = 0, e = static_cast(BlockScope.size()); + S != e; ++S) { std::vector &Abbrevs = BlockScope[S].PrevAbbrevs; - for (unsigned i = 0, e = Abbrevs.size(); i != e; ++i) + for (unsigned i = 0, e = static_cast(Abbrevs.size()); + i != e; ++i) Abbrevs[i]->dropRef(); } @@ -98,7 +101,8 @@ public: while (!BlockInfoRecords.empty()) { BlockInfo &Info = BlockInfoRecords.back(); // Free blockinfo abbrev info. - for (unsigned i = 0, e = Info.Abbrevs.size(); i != e; ++i) + for (unsigned i = 0, e = static_cast(Info.Abbrevs.size()); + i != e; ++i) Info.Abbrevs[i]->dropRef(); BlockInfoRecords.pop_back(); } @@ -127,7 +131,7 @@ public: // Skip over any bits that are already consumed. if (WordBitNo) { NextChar -= 4; - Read(WordBitNo); + Read(static_cast(WordBitNo)); } } @@ -237,7 +241,8 @@ private: if (!BlockInfoRecords.empty() && BlockInfoRecords.back().BlockID == BlockID) return &BlockInfoRecords.back(); - for (unsigned i = 0, e = BlockInfoRecords.size(); i != e; ++i) + for (unsigned i = 0, e = static_cast(BlockInfoRecords.size()); + i != e; ++i) if (BlockInfoRecords[i].BlockID == BlockID) return &BlockInfoRecords[i]; return 0; @@ -282,7 +287,8 @@ public: // Add the abbrevs specific to this block to the CurAbbrevs list. if (BlockInfo *Info = getBlockInfo(BlockID)) { - for (unsigned i = 0, e = Info->Abbrevs.size(); i != e; ++i) { + for (unsigned i = 0, e = static_cast(Info->Abbrevs.size()); + i != e; ++i) { CurAbbrevs.push_back(Info->Abbrevs[i]); CurAbbrevs.back()->addRef(); } @@ -317,7 +323,8 @@ private: CurCodeSize = BlockScope.back().PrevCodeSize; // Delete abbrevs from popped scope. - for (unsigned i = 0, e = CurAbbrevs.size(); i != e; ++i) + for (unsigned i = 0, e = static_cast(CurAbbrevs.size()); + i != e; ++i) CurAbbrevs[i]->dropRef(); BlockScope.back().PrevAbbrevs.swap(CurAbbrevs);