summaryrefslogtreecommitdiffstats
path: root/llvm/lib
diff options
context:
space:
mode:
authorRafael Espindola <rafael.espindola@gmail.com>2014-11-06 22:39:16 +0000
committerRafael Espindola <rafael.espindola@gmail.com>2014-11-06 22:39:16 +0000
commite2541bd60ea3a7518778ed388771e61da6d556a2 (patch)
tree1370e0f9d05dafb27cf53bcb19f0df48cf78048d /llvm/lib
parent615ab8e7211c2be58f04f42e2b10e0f4837f251a (diff)
downloadbcm5719-llvm-e2541bd60ea3a7518778ed388771e61da6d556a2.tar.gz
bcm5719-llvm-e2541bd60ea3a7518778ed388771e61da6d556a2.zip
Factor out call to push_back. NFC.
llvm-svn: 221490
Diffstat (limited to 'llvm/lib')
-rw-r--r--llvm/lib/Bitcode/Reader/BitstreamReader.cpp8
1 files changed, 5 insertions, 3 deletions
diff --git a/llvm/lib/Bitcode/Reader/BitstreamReader.cpp b/llvm/lib/Bitcode/Reader/BitstreamReader.cpp
index 720ca069435..581a4402f94 100644
--- a/llvm/lib/Bitcode/Reader/BitstreamReader.cpp
+++ b/llvm/lib/Bitcode/Reader/BitstreamReader.cpp
@@ -62,20 +62,22 @@ void BitstreamCursor::readAbbreviatedField(const BitCodeAbbrevOp &Op,
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) {
OpenPOWER on IntegriCloud