llvm::yaml

YAML serialization support for Machine IR (MIR).

Types

NameDescription
AliasNode Represents an alias to a Node with an anchor.
BinaryRef Specialized YAMLIO scalar type for representing a binary blob.
BlockScalarNode A block scalar node is an opaque datum that can be presented as a series of zero or more Unicode scalar values.
BlockScalarTraits This class should be specialized by type that requires custom conversion to/from a YAML literal block scalar. For example:
BlockStringValue A string value intended for YAML literal block scalars.
CallSiteInfo Serializable representation of CallSiteInfo.
CalledGlobal Serializable representation of a called global referenced from MIR.
CheckIsBool Helper that validates an expression can be used as a bool template argument.
ContiguousBlobAccumulator Builds a contiguous binary blob while tracking an absolute output offset.
CustomMappingTraits Traits for converting a type to/from a YAML mapping with dynamic keys.
DebugValueSubstitution Serializable representation of debug value substitutions.
Document A YAML Stream is a sequence of Documents. A document contains a root node.
DocumentListTraits This class should be specialized by any type that needs to be converted to/from a list of YAML documents.
EmptyContext Empty context type used when no mapping context is required.
EntryValueObject Serializable representation of the MCRegister variant of MachineFunction::VariableDbgInfo.
FixedMachineStackObject Serializable representation of the fixed stack object from the MachineFrameInfo class.
FlowStringValue A StringValue that prefers flow-sequence formatting when used in lists.
FrameIndex A serializaable representation of a reference to a stack object or fixed stack object.
FunctionsYAML YAML root mapping for call-site data loaded from a YAML file.
GlobalValueSummaryYaml YAML-friendly view of a global-value summary entry.
Hex16 Unsigned uint16_t value formatted as hexadecimal in YAML.
Hex32 Unsigned uint32_t value formatted as hexadecimal in YAML.
Hex64 Unsigned uint64_t value formatted as hexadecimal in YAML.
Hex8 Unsigned uint8_t value formatted as hexadecimal in YAML.
IO Function-pointer type matching ScalarEnumerationTraits::enumeration.
Input Parses YAML text into in-memory structs and vectors.
IsFlowSequenceBase Empty base used when a sequence is not flow-formatted.
IsResizableBase Base providing resizable (or bounds-checked) sequence element access.
KeyValueNode A key and value pair. While not technically a Node under the YAML representation graph, it is easier to treat them this way.
MachineConstantPoolValue Serializable representation of a machine constant-pool entry.
MachineFrameInfo Serializable representation of MachineFrameInfo.
MachineFunction Serializable representation of a machine function in MIR YAML.
MachineFunctionInfo Targets should override this in a way that mirrors the implementation of llvm::MachineFunctionInfo.
MachineFunctionLiveIn Serializable representation of a live-in register for a machine function.
MachineInstrLoc Identifies call instruction location in machine function.
MachineJumpTable Serializable representation of a machine jump table.
MachineStackObject Serializable representation of stack object from the MachineFrameInfo class.
MappingContextTraits This class is similar to MappingTraits<T> but allows you to pass in additional context for each map operation. For example:
MappingNode Represents a YAML map created from either a block map for a flow map.
MappingNormalization Stack-allocated helper that [de]normalizes TFinal via TNorm for YAML I/O.
MappingNormalizationHeap Heap/bump-allocated helper that [de]normalizes TFinal via TNorm for YAML I/O.
MappingTraits This class should be specialized by any type that needs to be converted to/from a YAML mapping. For example:
MissingTrait Incomplete type used to produce a clearer error when traits are missing.
Node Abstract base class for all Nodes.
NullNode A null value.
Output Generates YAML text from in-memory structs and vectors.
PolymorphicTraits This class should be specialized by any type that can be represented as a scalar, map, or sequence, decided dynamically. For example:
SaveRestorePointEntry One save or restore point in a savePoint / restorePoint list.
ScalarBitSetTraits This class should be specialized by any integer type that is a union of bit values and the YAML representation is a flow sequence of strings. For example:
ScalarEnumerationTraits Traits for converting an integral type to/from a YAML enumeration scalar.
ScalarNode A scalar node is an opaque datum that can be presented as a series of zero or more Unicode scalar values.
ScalarTraits This class should be specialized by type that requires custom conversion to/from a yaml scalar. For example:
Scanner Tokenizer that produces a stream of YAML tokens from an input buffer.
SequenceElementTraits This class should be specialized by any type for which vectors of that type need to be converted to/from a YAML sequence.
SequenceNode Represents a YAML sequence created from either a block sequence for a flow sequence.
SequenceTraits This class should be specialized by any type that needs to be converted to/from a YAML sequence. For example:
SequenceTraitsImpl Shared SequenceTraits implementation for standard sequence containers.
StdMapStringCustomMappingTraitsImpl Implementation of CustomMappingTraits for std::map<std::string, T>.
Stream This class represents a YAML stream potentially containing multiple documents.
StringValue A wrapper around std::string which contains a source range that's being set during parsing.
TaggedScalarTraits This class should be specialized by type that requires custom conversion to/from a YAML scalar with optional tags. For example:
Token A single lexical token produced by the YAML scanner.
UnsignedValue A wrapper around unsigned which contains a source range that's being set during parsing.
VirtualRegisterDefinition Serializable representation of a virtual register definition.
YamlObjectFile YAML representation of an object file in one of several formats.
basic_collection_iterator This is an iterator abstraction over YAML collections shared by both sequences and maps.
document_iterator Iterator abstraction for Documents over a Stream.
has_BlockScalarTraits Detects whether BlockScalarTraits<T> provides input/output.
has_CustomMappingTraits Detects whether CustomMappingTraits<T> provides inputOne.
has_DocumentListTraits Detects whether DocumentListTraits<T> provides a size method.
has_FlowTraits Detects whether type T defines a static flow flag.
has_MappingEnumInputTraits Detects whether MappingContextTraits<T, Context> provides enumInput.
has_MappingTraits Detects whether MappingContextTraits<T, Context> provides mapping.
has_MappingValidateTraits Detects whether MappingContextTraits<T, Context> provides validate.
has_PolymorphicTraits Detects whether PolymorphicTraits<T> provides getKind.
has_ScalarBitSetTraits Detects whether ScalarBitSetTraits<T> provides bitset.
has_ScalarEnumerationTraits Detects whether ScalarEnumerationTraits<T> provides enumeration.
has_ScalarTraits Detects whether ScalarTraits<T> provides input/output/mustQuote.
has_SequenceMethodTraits Detects whether SequenceTraits<T> provides a size method.
has_SequenceTraits True when SequenceTraits<T> is defined via a size method.
has_TaggedScalarTraits Detects whether TaggedScalarTraits<T> provides input/output/mustQuote.
missingTraits True when no YAML traits are defined for T with Context.
unvalidatedMappingTraits True when T has mapping traits without a validate hook.
validatedMappingTraits True when T has mapping traits that include a validate hook.

Type Aliases

NameDescription
ErrorHandler Callback invoked with a diagnostic message when YAML-to-object conversion fails.
StringAndGUID Pair of a symbol name and its GUID for YAML I/O.
char_16 Fixed-size 16-byte character array used for Mach-O string fields.
check_resize_t Detects whether T supports resize(0).
uuid_t UUID value type used by Mach-O YAML traits, formatted like otool.

Enums

NameDescription
NodeKind Kind of YAML node being read or written.
QuotingType Quoting style to use when emitting a YAML scalar.

Functions

NameDescription
begin Return a begin iterator for collection C; may be used only once.
convertYAML Convert the YAML document at DocNum from YIn into a binary object on Out.
dumpTokens Dump all the tokens in this stream to OS.
escape Escape Input for use inside a double-quoted YAML scalar.
isBool Return true if S is a YAML boolean scalar token.
isNull Return true if S is a YAML null scalar token.
isNumeric Return true if S looks like a YAML numeric scalar.
needsQuotes Determine the quoting style required for scalar S.
operator>> Right shift operators
parseBool Parse S as a bool according to https://yaml.org/type/bool.html.
scanTokens Scans all tokens in input without outputting anything. This is used for benchmarking the tokenizer.
skip Skip all remaining entries in collection C.
yaml2ObjectFile Convenience function for tests.
yaml2archive Write the archive described by Doc as a binary object to Out.
yaml2coff Write the COFF object described by Doc as a binary object to Out.
yaml2dxcontainer Write the DXContainer object described by Doc as a binary object to Out.
yaml2elf Write the ELF object described by Doc as a binary object to Out.
yaml2goff Write the GOFF object described by Doc as a binary object to Out.
yaml2macho Write the Mach-O object described by Doc as a binary object to Out.
yaml2minidump Write the minidump described by Doc as a binary object to Out.
yaml2offload Write the offload binary described by Doc as a binary object to Out.
yaml2wasm Write the Wasm object described by Doc as a binary object to Out.
yaml2xcoff Write the XCOFF object described by Doc as a binary object to Out.
yamlize yamlize overloads
yamlizeMappingEnumInput Try converting mapping Val via an enumInput trait on input.
operator<< Left shift operators
operator== Compare two BinaryRefs for equality of mode and data.