| OLD | NEW |
| 1 //===- NaClBitstreamReader.h -----------------------------------*- C++ -*-===// | 1 //===- NaClBitstreamReader.h -----------------------------------*- C++ -*-===// |
| 2 // Low-level bitstream reader interface | 2 // Low-level bitstream reader interface |
| 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 345 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 356 CurWord = 0; | 356 CurWord = 0; |
| 357 BitsInCurWord = 0; | 357 BitsInCurWord = 0; |
| 358 return 0; | 358 return 0; |
| 359 } | 359 } |
| 360 | 360 |
| 361 uint32_t R = uint32_t(CurWord); | 361 uint32_t R = uint32_t(CurWord); |
| 362 | 362 |
| 363 // Read the next word from the stream. | 363 // Read the next word from the stream. |
| 364 uint8_t Array[sizeof(word_t)] = {0}; | 364 uint8_t Array[sizeof(word_t)] = {0}; |
| 365 | 365 |
| 366 BitStream->getBitcodeBytes().readBytes(NextChar, sizeof(Array), | 366 BitStream->getBitcodeBytes().readBytes(NextChar, sizeof(Array), Array); |
| 367 Array, NULL); | |
| 368 | 367 |
| 369 // Handle big-endian byte-swapping if necessary. | 368 // Handle big-endian byte-swapping if necessary. |
| 370 support::detail::packed_endian_specific_integral | 369 support::detail::packed_endian_specific_integral |
| 371 <word_t, support::little, support::unaligned> EndianValue; | 370 <word_t, support::little, support::unaligned> EndianValue; |
| 372 memcpy(&EndianValue, Array, sizeof(Array)); | 371 memcpy(&EndianValue, Array, sizeof(Array)); |
| 373 | 372 |
| 374 CurWord = EndianValue; | 373 CurWord = EndianValue; |
| 375 | 374 |
| 376 NextChar += sizeof(word_t); | 375 NextChar += sizeof(word_t); |
| 377 | 376 |
| (...skipping 175 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 553 // Abbrev Processing | 552 // Abbrev Processing |
| 554 //===--------------------------------------------------------------------===// | 553 //===--------------------------------------------------------------------===// |
| 555 void ReadAbbrevRecord(); | 554 void ReadAbbrevRecord(); |
| 556 | 555 |
| 557 bool ReadBlockInfoBlock(); | 556 bool ReadBlockInfoBlock(); |
| 558 }; | 557 }; |
| 559 | 558 |
| 560 } // End llvm namespace | 559 } // End llvm namespace |
| 561 | 560 |
| 562 #endif | 561 #endif |
| OLD | NEW |