[llvm] r221490 - Factor out call to push_back. NFC.
Rafael Espindola
rafael.espindola at gmail.com
Thu Nov 6 14:39:16 PST 2014
Author: rafael
Date: Thu Nov 6 16:39:16 2014
New Revision: 221490
URL: http://llvm.org/viewvc/llvm-project?rev=221490&view=rev
Log:
Factor out call to push_back. NFC.
Modified:
llvm/trunk/lib/Bitcode/Reader/BitstreamReader.cpp
Modified: llvm/trunk/lib/Bitcode/Reader/BitstreamReader.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Bitcode/Reader/BitstreamReader.cpp?rev=221490&r1=221489&r2=221490&view=diff
==============================================================================
--- llvm/trunk/lib/Bitcode/Reader/BitstreamReader.cpp (original)
+++ llvm/trunk/lib/Bitcode/Reader/BitstreamReader.cpp Thu Nov 6 16:39:16 2014
@@ -62,20 +62,22 @@ void BitstreamCursor::readAbbreviatedFie
assert(!Op.isLiteral() && "Use ReadAbbreviatedLiteral for literals!");
// Decode the value as we are commanded.
+ uint64_t Val;
switch (Op.getEncoding()) {
case BitCodeAbbrevOp::Array:
case BitCodeAbbrevOp::Blob:
llvm_unreachable("Should not reach here");
case BitCodeAbbrevOp::Fixed:
- Vals.push_back(Read((unsigned)Op.getEncodingData()));
+ Val = Read((unsigned)Op.getEncodingData());
break;
case BitCodeAbbrevOp::VBR:
- Vals.push_back(ReadVBR64((unsigned)Op.getEncodingData()));
+ Val = ReadVBR64((unsigned)Op.getEncodingData());
break;
case BitCodeAbbrevOp::Char6:
- Vals.push_back(BitCodeAbbrevOp::DecodeChar6(Read(6)));
+ Val = BitCodeAbbrevOp::DecodeChar6(Read(6));
break;
}
+ Vals.push_back(Val);
}
void BitstreamCursor::skipAbbreviatedField(const BitCodeAbbrevOp &Op) {
More information about the llvm-commits
mailing list