Lines Matching +full:stream +full:- +full:id +full:- +full:range

1 //===- SerializedDiagnosticReader.cpp - Reads diagnostics -----------------===//
5 // SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
7 //===----------------------------------------------------------------------===//
37 llvm::BitstreamCursor Stream(**Buffer); in readDiagnostics() local
40 if (Stream.AtEndOfStream()) in readDiagnostics()
45 if (Expected<llvm::SimpleBitstreamCursor::word_t> Res = Stream.Read(8)) { in readDiagnostics()
56 while (!Stream.AtEndOfStream()) { in readDiagnostics()
57 if (Expected<unsigned> Res = Stream.ReadCode()) { in readDiagnostics()
67 Expected<unsigned> MaybeSubBlockID = Stream.ReadSubBlockID(); in readDiagnostics()
77 Stream.ReadBlockInfoBlock(); in readDiagnostics()
87 Stream.setBlockInfo(&*BlockInfo); in readDiagnostics()
90 if ((EC = readMetaBlock(Stream))) in readDiagnostics()
94 if ((EC = readDiagnosticBlock(Stream))) in readDiagnostics()
98 if (llvm::Error Err = Stream.SkipBlock()) { in readDiagnostics()
117 llvm::BitstreamCursor &Stream, unsigned &BlockOrRecordID) { in skipUntilRecordOrBlock() argument
120 while (!Stream.AtEndOfStream()) { in skipUntilRecordOrBlock()
122 if (Expected<unsigned> Res = Stream.ReadCode()) in skipUntilRecordOrBlock()
134 if (Expected<unsigned> Res = Stream.ReadSubBlockID()) in skipUntilRecordOrBlock()
141 if (Stream.ReadBlockEnd()) in skipUntilRecordOrBlock()
146 if (llvm::Error Err = Stream.ReadAbbrevRecord()) in skipUntilRecordOrBlock()
154 llvm_unreachable("Unexpected abbrev id."); in skipUntilRecordOrBlock()
162 SerializedDiagnosticReader::readMetaBlock(llvm::BitstreamCursor &Stream) { in readMetaBlock() argument
164 Stream.EnterSubBlock(clang::serialized_diags::BLOCK_META)) { in readMetaBlock()
174 llvm::ErrorOr<Cursor> Res = skipUntilRecordOrBlock(Stream, BlockOrCode); in readMetaBlock()
182 if (llvm::Error Err = Stream.SkipBlock()) { in readMetaBlock()
195 Expected<unsigned> MaybeRecordID = Stream.readRecord(BlockOrCode, Record); in readMetaBlock()
211 SerializedDiagnosticReader::readDiagnosticBlock(llvm::BitstreamCursor &Stream) { in readDiagnosticBlock() argument
213 Stream.EnterSubBlock(clang::serialized_diags::BLOCK_DIAG)) { in readDiagnosticBlock()
226 llvm::ErrorOr<Cursor> Res = skipUntilRecordOrBlock(Stream, BlockOrCode); in readDiagnosticBlock()
234 if ((EC = readDiagnosticBlock(Stream))) in readDiagnosticBlock()
236 } else if (llvm::Error Err = Stream.SkipBlock()) { in readDiagnosticBlock()
254 Stream.readRecord(BlockOrCode, Record, &Blob); in readDiagnosticBlock()
265 // A category has ID and name size. in readDiagnosticBlock()
282 // A diagnostic flag has ID and name size. in readDiagnosticBlock()
289 // A filename has ID, size, timestamp, and name size. The size and in readDiagnosticBlock()
306 // A source range is two locations (4 each). in readDiagnosticBlock()
342 return "Malformed block at top-level of diagnostics"; in message()
344 return "Malformed sub-block in a diagnostic"; in message()