LLVM  6.0.0svn
Classes | Namespaces | Macros | Enumerations | Functions
RecordSerialization.h File Reference
#include "llvm/ADT/APSInt.h"
#include "llvm/ADT/ArrayRef.h"
#include "llvm/ADT/StringRef.h"
#include "llvm/DebugInfo/CodeView/CodeView.h"
#include "llvm/DebugInfo/CodeView/CodeViewError.h"
#include "llvm/Support/BinaryStreamReader.h"
#include "llvm/Support/Endian.h"
#include "llvm/Support/Error.h"
#include <cinttypes>
#include <tuple>
Include dependency graph for RecordSerialization.h:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Classes

struct  llvm::codeview::RecordPrefix
 
struct  llvm::codeview::serialize_conditional_impl< T, U >
 
struct  llvm::codeview::serialize_array_impl< T, U >
 
struct  llvm::codeview::serialize_vector_tail_impl< T >
 
struct  llvm::codeview::serialize_null_term_string_array_impl
 
struct  llvm::codeview::serialize_arrayref_tail_impl< T >
 
struct  llvm::codeview::serialize_numeric_impl< T >
 

Namespaces

 llvm
 Compute iterated dominance frontiers using a linear time algorithm.
 
 llvm::codeview
 

Macros

#define CV_CONDITIONAL_FIELD(I, C)   serialize_conditional(I, [&]() { return !!(C); })
 
#define CV_ARRAY_FIELD_N(I, N)   serialize_array(I, [&]() { return N; })
 
#define CV_ARRAY_FIELD_TAIL(I)   serialize_array_tail(I)
 
#define CV_STRING_ARRAY_NULL_TERM(I)   serialize_null_term_string_array(I)
 
#define CV_NUMERIC_FIELD(I)   serialize_numeric(I)
 
#define CV_DESERIALIZE(...)
 

Enumerations

enum  : unsigned { llvm::codeview::MaxRecordLength = 0xFF00 }
 Limit on the size of all codeview symbol and type records, including the RecordPrefix. More...
 

Functions

StringRef llvm::codeview::getBytesAsCharacters (ArrayRef< uint8_t > LeafData)
 Reinterpret a byte array as an array of characters. More...
 
StringRef llvm::codeview::getBytesAsCString (ArrayRef< uint8_t > LeafData)
 
Error llvm::codeview::consume (BinaryStreamReader &Reader)
 
Error llvm::codeview::consume (BinaryStreamReader &Reader, APSInt &Num)
 Decodes a numeric "leaf" value. More...
 
Error llvm::codeview::consume_numeric (BinaryStreamReader &Reader, uint64_t &Value)
 Decodes a numeric leaf value that is known to be a particular type. More...
 
Error llvm::codeview::consume (BinaryStreamReader &Reader, uint32_t &Item)
 Decodes signed and unsigned fixed-length integers. More...
 
Error llvm::codeview::consume (BinaryStreamReader &Reader, int32_t &Item)
 
Error llvm::codeview::consume (BinaryStreamReader &Reader, StringRef &Item)
 Decodes a null terminated string. More...
 
Error llvm::codeview::consume (StringRef &Data, APSInt &Num)
 
Error llvm::codeview::consume (StringRef &Data, uint32_t &Item)
 
template<typename T >
Error llvm::codeview::consume (BinaryStreamReader &Reader, T *&Item)
 Decodes an arbitrary object whose layout matches that of the underlying byte sequence, and returns a pointer to the object. More...
 
template<typename T , typename U >
serialize_conditional_impl< T, U > llvm::codeview::serialize_conditional (T &Item, U Func)
 
template<typename T , typename U >
serialize_array_impl< T, U > llvm::codeview::serialize_array (ArrayRef< T > &Item, U Func)
 
serialize_null_term_string_array_impl llvm::codeview::serialize_null_term_string_array (std::vector< StringRef > &Item)
 
template<typename T >
serialize_vector_tail_impl< Tllvm::codeview::serialize_array_tail (std::vector< T > &Item)
 
template<typename T >
serialize_arrayref_tail_impl< Tllvm::codeview::serialize_array_tail (ArrayRef< T > &Item)
 
template<typename T >
serialize_numeric_impl< Tllvm::codeview::serialize_numeric (T &Item)
 
template<typename T , typename U >
Error llvm::codeview::consume (BinaryStreamReader &Reader, const serialize_conditional_impl< T, U > &Item)
 
template<typename T , typename U >
Error llvm::codeview::consume (BinaryStreamReader &Reader, const serialize_array_impl< T, U > &Item)
 
Error llvm::codeview::consume (BinaryStreamReader &Reader, const serialize_null_term_string_array_impl &Item)
 
template<typename T >
Error llvm::codeview::consume (BinaryStreamReader &Reader, const serialize_vector_tail_impl< T > &Item)
 
template<typename T >
Error llvm::codeview::consume (BinaryStreamReader &Reader, const serialize_arrayref_tail_impl< T > &Item)
 
template<typename T >
Error llvm::codeview::consume (BinaryStreamReader &Reader, const serialize_numeric_impl< T > &Item)
 
template<typename T , typename U , typename... Args>
Error llvm::codeview::consume (BinaryStreamReader &Reader, T &&X, U &&Y, Args &&... Rest)
 

Macro Definition Documentation

◆ CV_ARRAY_FIELD_N

#define CV_ARRAY_FIELD_N (   I,
  N 
)    serialize_array(I, [&]() { return N; })

Definition at line 192 of file RecordSerialization.h.

◆ CV_ARRAY_FIELD_TAIL

#define CV_ARRAY_FIELD_TAIL (   I)    serialize_array_tail(I)

Definition at line 195 of file RecordSerialization.h.

◆ CV_CONDITIONAL_FIELD

#define CV_CONDITIONAL_FIELD (   I,
  C 
)    serialize_conditional(I, [&]() { return !!(C); })

Definition at line 187 of file RecordSerialization.h.

◆ CV_DESERIALIZE

#define CV_DESERIALIZE (   ...)
Value:
if (auto EC = consume(__VA_ARGS__)) \
return std::move(EC);
Error consume(BinaryStreamReader &Reader, T &&X, U &&Y, Args &&... Rest)

Definition at line 245 of file RecordSerialization.h.

◆ CV_NUMERIC_FIELD

#define CV_NUMERIC_FIELD (   I)    serialize_numeric(I)

Definition at line 201 of file RecordSerialization.h.

◆ CV_STRING_ARRAY_NULL_TERM

#define CV_STRING_ARRAY_NULL_TERM (   I)    serialize_null_term_string_array(I)

Definition at line 199 of file RecordSerialization.h.