void NaClBitstreamCursor::skipAbbreviatedField(const NaClBitCodeAbbrevOp &Op) { assert(!Op.isLiteral() && "Use ReadAbbreviatedLiteral for literals!"); // Decode the value as we are commanded. switch (Op.getEncoding()) { default: report_fatal_error("Should not reach here"); case NaClBitCodeAbbrevOp::Fixed: (void)Read((unsigned)Op.getEncodingData()); break; case NaClBitCodeAbbrevOp::VBR: (void)ReadVBR64((unsigned)Op.getEncodingData()); break; case NaClBitCodeAbbrevOp::Char6: (void)Read(6); break; } }
void NaClBitstreamCursor::readAbbreviatedField( const NaClBitCodeAbbrevOp &Op, SmallVectorImpl<uint64_t> &Vals) { assert(!Op.isLiteral() && "Use ReadAbbreviatedLiteral for literals!"); // Decode the value as we are commanded. switch (Op.getEncoding()) { default: report_fatal_error("Should not reach here"); case NaClBitCodeAbbrevOp::Fixed: Vals.push_back(Read((unsigned)Op.getEncodingData())); break; case NaClBitCodeAbbrevOp::VBR: Vals.push_back(ReadVBR64((unsigned)Op.getEncodingData())); break; case NaClBitCodeAbbrevOp::Char6: Vals.push_back(NaClBitCodeAbbrevOp::DecodeChar6(Read(6))); break; } }