OLD | NEW |
1 //===- NaClBitstreamReader.cpp --------------------------------------------===// | 1 //===- NaClBitstreamReader.cpp --------------------------------------------===// |
2 // NaClBitstreamReader implementation | 2 // NaClBitstreamReader implementation |
3 // | 3 // |
4 // The LLVM Compiler Infrastructure | 4 // The LLVM Compiler Infrastructure |
5 // | 5 // |
6 // This file is distributed under the University of Illinois Open Source | 6 // This file is distributed under the University of Illinois Open Source |
7 // License. See LICENSE.TXT for details. | 7 // License. See LICENSE.TXT for details. |
8 // | 8 // |
9 //===----------------------------------------------------------------------===// | 9 //===----------------------------------------------------------------------===// |
10 | 10 |
(...skipping 170 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
181 return Read((unsigned)Op.getValue()); | 181 return Read((unsigned)Op.getValue()); |
182 case NaClBitCodeAbbrevOp::VBR: | 182 case NaClBitCodeAbbrevOp::VBR: |
183 return ReadVBR64((unsigned)Op.getValue()); | 183 return ReadVBR64((unsigned)Op.getValue()); |
184 case NaClBitCodeAbbrevOp::Array: | 184 case NaClBitCodeAbbrevOp::Array: |
185 // This can't happen because the abbreviation must be valid. | 185 // This can't happen because the abbreviation must be valid. |
186 llvm_unreachable("Bad array abbreviation encoding!"); | 186 llvm_unreachable("Bad array abbreviation encoding!"); |
187 break; | 187 break; |
188 case NaClBitCodeAbbrevOp::Char6: | 188 case NaClBitCodeAbbrevOp::Char6: |
189 return NaClBitCodeAbbrevOp::DecodeChar6(Read(6)); | 189 return NaClBitCodeAbbrevOp::DecodeChar6(Read(6)); |
190 } | 190 } |
| 191 llvm_unreachable("Illegal abbreviation encoding for field!"); |
191 } | 192 } |
192 | 193 |
193 void NaClBitstreamCursor::readArrayAbbrev( | 194 void NaClBitstreamCursor::readArrayAbbrev( |
194 const NaClBitCodeAbbrevOp &Op, unsigned NumArrayElements, | 195 const NaClBitCodeAbbrevOp &Op, unsigned NumArrayElements, |
195 SmallVectorImpl<uint64_t> &Vals) { | 196 SmallVectorImpl<uint64_t> &Vals) { |
196 for (; NumArrayElements; --NumArrayElements) { | 197 for (; NumArrayElements; --NumArrayElements) { |
197 Vals.push_back(readArrayAbbreviatedField(Op)); | 198 Vals.push_back(readArrayAbbreviatedField(Op)); |
198 } | 199 } |
199 } | 200 } |
200 | 201 |
(...skipping 234 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
435 UpdateAbbrevs = | 436 UpdateAbbrevs = |
436 &BitStream->getBlockInfo((unsigned)Record[0])->getAbbrevs(); | 437 &BitStream->getBlockInfo((unsigned)Record[0])->getAbbrevs(); |
437 if (Listener) { | 438 if (Listener) { |
438 Listener->Values = Record; | 439 Listener->Values = Record; |
439 Listener->SetBID(); | 440 Listener->SetBID(); |
440 } | 441 } |
441 break; | 442 break; |
442 } | 443 } |
443 } | 444 } |
444 } | 445 } |
OLD | NEW |