| OLD | NEW |
| 1 //===- NaClBitcodeParser.h -----------------------------------*- C++ -*-===// | 1 //===- NaClBitcodeParser.h -----------------------------------*- C++ -*-===// |
| 2 // Low-level bitcode driver to parse PNaCl bitcode files. | 2 // Low-level bitcode driver to parse PNaCl bitcode files. |
| 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 439 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 450 Cursor.setErrorHandler(ErrHandler); | 450 Cursor.setErrorHandler(ErrHandler); |
| 451 } | 451 } |
| 452 | 452 |
| 453 virtual ~NaClBitcodeParser(); | 453 virtual ~NaClBitcodeParser(); |
| 454 | 454 |
| 455 /// Reads the (top-level) block associated with the given block | 455 /// Reads the (top-level) block associated with the given block |
| 456 /// record at the stream cursor. Returns true if unable to parse. | 456 /// record at the stream cursor. Returns true if unable to parse. |
| 457 /// Can be called multiple times to parse multiple blocks. | 457 /// Can be called multiple times to parse multiple blocks. |
| 458 bool Parse(); | 458 bool Parse(); |
| 459 | 459 |
| 460 /// Returns true if at end of buffer. |
| 461 bool AtEndOfStream() const { |
| 462 return Record.GetCursor().AtEndOfStream(); |
| 463 } |
| 464 |
| 460 // Called once the bitstream reader has entered the corresponding | 465 // Called once the bitstream reader has entered the corresponding |
| 461 // subblock. Argument NumWords is set to the number of words in the | 466 // subblock. Argument NumWords is set to the number of words in the |
| 462 // corresponding subblock. | 467 // corresponding subblock. |
| 463 virtual void EnterBlock(unsigned /*NumWords*/) {} | 468 virtual void EnterBlock(unsigned /*NumWords*/) {} |
| 464 | 469 |
| 465 // Called when the corresponding EndBlock of the block being parsed | 470 // Called when the corresponding EndBlock of the block being parsed |
| 466 // is found. | 471 // is found. |
| 467 virtual void ExitBlock() {} | 472 virtual void ExitBlock() {} |
| 468 | 473 |
| 469 // Called after each record (within the block) is read (into field Record). | 474 // Called after each record (within the block) is read (into field Record). |
| (...skipping 182 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 652 bool ParseBlockInternal(); | 657 bool ParseBlockInternal(); |
| 653 | 658 |
| 654 void operator=(const NaClBitcodeParser &Parser) LLVM_DELETED_FUNCTION; | 659 void operator=(const NaClBitcodeParser &Parser) LLVM_DELETED_FUNCTION; |
| 655 NaClBitcodeParser(const NaClBitcodeParser &Parser) LLVM_DELETED_FUNCTION; | 660 NaClBitcodeParser(const NaClBitcodeParser &Parser) LLVM_DELETED_FUNCTION; |
| 656 | 661 |
| 657 }; | 662 }; |
| 658 | 663 |
| 659 } // namespace llvm | 664 } // namespace llvm |
| 660 | 665 |
| 661 #endif | 666 #endif |
| OLD | NEW |