Chromium Code Reviews| Index: include/llvm/Bitcode/NaCl/NaClBitstreamReader.h |
| diff --git a/include/llvm/Bitcode/NaCl/NaClBitstreamReader.h b/include/llvm/Bitcode/NaCl/NaClBitstreamReader.h |
| index 4aa827d3d7c8716c5de71a57d03974b837af60ff..47fa7ebc3d654c61f4b7f9b4e3cdad940bb1b89d 100644 |
| --- a/include/llvm/Bitcode/NaCl/NaClBitstreamReader.h |
| +++ b/include/llvm/Bitcode/NaCl/NaClBitstreamReader.h |
| @@ -27,6 +27,28 @@ namespace llvm { |
| class Deserializer; |
| +namespace naclbitc { |
| + |
| +/// Returns the Bit as a Byte:BitInByte string. MinByteWidth is the |
|
jvoung (off chromium)
2015/03/06 22:30:27
There's no MinByteWidth argument for this function
Karl
2015/03/06 22:54:20
Good catch. Removing the sentence.
|
| +/// minimum number of characters to print out the Byte value (blank |
| +/// fills). |
| +std::string getBitAddress(uint64_t Bit); |
| + |
| +/// Severity levels for reporting errors. |
| +enum ErrorLevel { |
| + Warning, |
| + Error, |
| + Fatal |
| +}; |
| + |
| +// Basic printing routine to generate the beginning of an error |
| +// message. BitPosition is the bit position the error was found. |
| +// Level is the severity of the error. |
| +raw_ostream &ErrorAt(raw_ostream &Out, ErrorLevel Level, |
| + uint64_t BitPosition); |
| + |
| +} // End namespace naclbitc. |
| + |
| /// This class is used to read from a NaCl bitcode wire format stream, |
| /// maintaining information that is global to decoding the entire file. |
| /// While a file is being read, multiple cursors can be independently |
| @@ -88,11 +110,6 @@ public: |
| return InitialAddress; |
| } |
| - /// Returns the Bit as a Byte:BitInByte string. MinByteWidth is the |
| - /// minimum number of characters to print out the Byte value (blank |
| - /// fills). |
| - static std::string getBitAddress(uint64_t Bit, unsigned MinByteWidth=1); |
| - |
| //===--------------------------------------------------------------------===// |
| // Block Manipulation |
| //===--------------------------------------------------------------------===// |
| @@ -329,8 +346,8 @@ public: |
| /// Returns the current bit address (string) of the bit cursor. |
| /// MinByteWidth is the minimum number of characters to print out |
|
jvoung (off chromium)
2015/03/06 22:30:27
There's no MinByteWidth parameter here anymore.
Karl
2015/03/06 22:54:20
Removed the sentence.
|
| /// the Byte value (blank fills). |
| - std::string getCurrentBitAddress(unsigned MinByteWidth=1) const { |
| - return BitStream->getBitAddress(GetCurrentBitNo(), MinByteWidth); |
| + std::string getCurrentBitAddress() const { |
| + return naclbitc::getBitAddress(GetCurrentBitNo()); |
| } |
| /// Flags that modify the behavior of advance(). |