10 #ifndef LLVM_DEBUGINFO_CODEVIEW_RECORDSERIALIZATION_H 11 #define LLVM_DEBUGINFO_CODEVIEW_RECORDSERIALIZATION_H 84 template <
typename T,
typename U>
106 while (!Reader.
empty() && Reader.
peek() < LF_PAD0) {
109 Item.push_back(Field);
124 "Null terminated string is empty!");
126 while (Reader.
peek() != 0) {
130 Item.push_back(Field);
132 return Reader.
skip(1);
159 template <
typename T,
typename U>
169 template <
typename T>
174 template <
typename T>
183 template <
typename T,
typename U>
189 template <
typename T,
typename U>
200 template <
typename T>
206 template <
typename T>
212 template <
typename T>
218 template <
typename T,
typename U,
typename...
Args>
222 return consume(Reader,
Y, std::forward<Args>(Rest)...);
Error deserialize(BinaryStreamReader &Reader) const
static GCMetadataPrinterRegistry::Add< ErlangGCPrinter > X("erlang", "erlang-compatible garbage collector")
Error consume_numeric(BinaryStreamReader &Reader, uint64_t &Value)
Decodes a numeric leaf value that is known to be a particular type.
This class represents lattice values for constants.
Error deserialize(BinaryStreamReader &Reader) const
Error readObject(const T *&Dest)
Get a pointer to an object of type T from the underlying stream, as if by memcpy, and store the resul...
serialize_vector_tail_impl< T > serialize_array_tail(std::vector< T > &Item)
uint8_t peek() const
Examine the next byte of the underlying stream without advancing the stream's offset.
detail::packed_endian_specific_integral< uint16_t, little, unaligned > ulittle16_t
serialize_numeric_impl(T &Item)
static GCMetadataPrinterRegistry::Add< OcamlGCMetadataPrinter > Y("ocaml", "ocaml 3.10-compatible collector")
serialize_conditional_impl(T &Item, U Func)
serialize_array_impl(ArrayRef< T > &Item, U Func)
Error readCString(StringRef &Dest)
Read a null terminated string from Dest.
serialize_null_term_string_array_impl serialize_null_term_string_array(std::vector< StringRef > &Item)
detail::packed_endian_specific_integral< uint32_t, little, unaligned > ulittle32_t
serialize_array_impl< T, U > serialize_array(ArrayRef< T > &Item, U Func)
Error deserialize(BinaryStreamReader &Reader) const
static ErrorSuccess success()
Create a success value.
Error deserialize(BinaryStreamReader &Reader) const
std::vector< StringRef > & Item
serialize_arrayref_tail_impl(ArrayRef< T > &Item)
serialize_null_term_string_array_impl(std::vector< StringRef > &Item)
serialize_vector_tail_impl(std::vector< T > &Item)
StringRef getBytesAsCharacters(ArrayRef< uint8_t > LeafData)
Reinterpret a byte array as an array of characters.
StringRef getBytesAsCString(ArrayRef< uint8_t > LeafData)
detail::packed_endian_specific_integral< int32_t, little, unaligned > little32_t
Error skip(uint32_t Amount)
Advance the stream's offset by Amount bytes.
uint32_t bytesRemaining() const
serialize_numeric_impl< T > serialize_numeric(T &Item)
Error consume(BinaryStreamReader &Reader)
Error deserialize(BinaryStreamReader &Reader) const
LLVM Value Representation.
Lightweight error class with error context and mandatory checking.
Provides read only access to a subclass of BinaryStream.
StringRef - Represent a constant reference to a string, i.e.
Error deserialize(BinaryStreamReader &Reader) const
serialize_conditional_impl< T, U > serialize_conditional(T &Item, U Func)
constexpr char Args[]
Key for Kernel::Metadata::mArgs.
Error readArray(ArrayRef< T > &Array, uint32_t NumElements)
Get a reference to a NumElements element array of objects of type T from the underlying stream as if ...