LLVM 20.0.0git
Classes | Namespaces | Macros | Functions
MinidumpYAML.cpp File Reference
#include "llvm/ObjectYAML/MinidumpYAML.h"
#include "llvm/BinaryFormat/MinidumpConstants.def"

Go to the source code of this file.

Classes

struct  llvm::yaml::ScalarTraits< FixedSizeHex< N > >
 
struct  llvm::yaml::ScalarTraits< FixedSizeString< N > >
 

Namespaces

namespace  llvm
 This is an optimization pass for GlobalISel generic memory operations.
 
namespace  llvm::yaml
 

Macros

#define HANDLE_MDMP_PROTECT(CODE, NAME, NATIVENAME)    IO.bitSetCase(Protect, #NATIVENAME, MemoryProtection::NAME);
 
#define HANDLE_MDMP_MEMSTATE(CODE, NAME, NATIVENAME)    IO.bitSetCase(State, #NATIVENAME, MemoryState::NAME);
 
#define HANDLE_MDMP_MEMTYPE(CODE, NAME, NATIVENAME)    IO.bitSetCase(Type, #NATIVENAME, MemoryType::NAME);
 
#define HANDLE_MDMP_ARCH(CODE, NAME)    IO.enumCase(Arch, #NAME, ProcessorArchitecture::NAME);
 
#define HANDLE_MDMP_PLATFORM(CODE, NAME)    IO.enumCase(Plat, #NAME, OSPlatform::NAME);
 
#define HANDLE_MDMP_STREAM_TYPE(CODE, NAME)    IO.enumCase(Type, #NAME, StreamType::NAME);
 

Functions

template<typename EndianType >
static void mapOptional (yaml::IO &IO, const char *Key, EndianType &Val, typename EndianType::value_type Default)
 Perform an optional yaml-mapping of an endian-aware type EndianType.
 
template<typename MapType , typename EndianType >
static void mapRequiredAs (yaml::IO &IO, const char *Key, EndianType &Val)
 Yaml-map an endian-aware type EndianType as some other type MapType.
 
template<typename MapType , typename EndianType >
static void mapOptionalAs (yaml::IO &IO, const char *Key, EndianType &Val, MapType Default)
 Perform an optional yaml-mapping of an endian-aware type EndianType as some other type MapType.
 
template<typename EndianType >
static void mapRequiredHex (yaml::IO &IO, const char *Key, EndianType &Val)
 Yaml-map an endian-aware type as an appropriately-sized hex value.
 
template<typename EndianType >
static void mapOptionalHex (yaml::IO &IO, const char *Key, EndianType &Val, typename EndianType::value_type Default)
 Perform an optional yaml-mapping of an endian-aware type as an appropriately-sized hex value.
 
static void streamMapping (yaml::IO &IO, RawContentStream &Stream)
 
static std::string streamValidate (RawContentStream &Stream)
 
static void streamMapping (yaml::IO &IO, MemoryInfoListStream &Stream)
 
static void streamMapping (yaml::IO &IO, MemoryListStream &Stream)
 
static void streamMapping (yaml::IO &IO, Memory64ListStream &Stream)
 
static std::string streamValidate (Memory64ListStream &Stream)
 
static void streamMapping (yaml::IO &IO, SystemInfoStream &Stream)
 
static void streamMapping (yaml::IO &IO, TextContentStream &Stream)
 
static void streamMapping (yaml::IO &IO, MinidumpYAML::ExceptionStream &Stream)
 

Macro Definition Documentation

◆ HANDLE_MDMP_ARCH

#define HANDLE_MDMP_ARCH (   CODE,
  NAME 
)     IO.enumCase(Arch, #NAME, ProcessorArchitecture::NAME);

◆ HANDLE_MDMP_MEMSTATE

#define HANDLE_MDMP_MEMSTATE (   CODE,
  NAME,
  NATIVENAME 
)     IO.bitSetCase(State, #NATIVENAME, MemoryState::NAME);

◆ HANDLE_MDMP_MEMTYPE

#define HANDLE_MDMP_MEMTYPE (   CODE,
  NAME,
  NATIVENAME 
)     IO.bitSetCase(Type, #NATIVENAME, MemoryType::NAME);

◆ HANDLE_MDMP_PLATFORM

#define HANDLE_MDMP_PLATFORM (   CODE,
  NAME 
)     IO.enumCase(Plat, #NAME, OSPlatform::NAME);

◆ HANDLE_MDMP_PROTECT

#define HANDLE_MDMP_PROTECT (   CODE,
  NAME,
  NATIVENAME 
)     IO.bitSetCase(Protect, #NATIVENAME, MemoryProtection::NAME);

◆ HANDLE_MDMP_STREAM_TYPE

#define HANDLE_MDMP_STREAM_TYPE (   CODE,
  NAME 
)     IO.enumCase(Type, #NAME, StreamType::NAME);

Function Documentation

◆ mapOptional()

template<typename EndianType >
static void mapOptional ( yaml::IO &  IO,
const char Key,
EndianType &  Val,
typename EndianType::value_type  Default 
)
inlinestatic

Perform an optional yaml-mapping of an endian-aware type EndianType.

The only purpose of this function is to avoid casting the Default value to the endian type;

Definition at line 19 of file MinidumpYAML.cpp.

References Default.

Referenced by streamMapping().

◆ mapOptionalAs()

template<typename MapType , typename EndianType >
static void mapOptionalAs ( yaml::IO &  IO,
const char Key,
EndianType &  Val,
MapType  Default 
)
inlinestatic

Perform an optional yaml-mapping of an endian-aware type EndianType as some other type MapType.

Definition at line 36 of file MinidumpYAML.cpp.

References Default.

◆ mapOptionalHex()

template<typename EndianType >
static void mapOptionalHex ( yaml::IO &  IO,
const char Key,
EndianType &  Val,
typename EndianType::value_type  Default 
)
inlinestatic

Perform an optional yaml-mapping of an endian-aware type as an appropriately-sized hex value.

Definition at line 61 of file MinidumpYAML.cpp.

References Default.

Referenced by streamMapping().

◆ mapRequiredAs()

template<typename MapType , typename EndianType >
static void mapRequiredAs ( yaml::IO &  IO,
const char Key,
EndianType &  Val 
)
inlinestatic

Yaml-map an endian-aware type EndianType as some other type MapType.

Definition at line 26 of file MinidumpYAML.cpp.

◆ mapRequiredHex()

template<typename EndianType >
static void mapRequiredHex ( yaml::IO &  IO,
const char Key,
EndianType &  Val 
)
inlinestatic

Yaml-map an endian-aware type as an appropriately-sized hex value.

Definition at line 53 of file MinidumpYAML.cpp.

Referenced by streamMapping().

◆ streamMapping() [1/7]

static void streamMapping ( yaml::IO &  IO,
Memory64ListStream Stream 
)
static

Definition at line 324 of file MinidumpYAML.cpp.

◆ streamMapping() [2/7]

static void streamMapping ( yaml::IO &  IO,
MemoryInfoListStream Stream 
)
static

Definition at line 316 of file MinidumpYAML.cpp.

◆ streamMapping() [3/7]

static void streamMapping ( yaml::IO &  IO,
MemoryListStream Stream 
)
static

Definition at line 320 of file MinidumpYAML.cpp.

◆ streamMapping() [4/7]

static void streamMapping ( yaml::IO &  IO,
MinidumpYAML::ExceptionStream Stream 
)
static

Definition at line 402 of file MinidumpYAML.cpp.

References mapRequiredHex().

◆ streamMapping() [5/7]

static void streamMapping ( yaml::IO &  IO,
RawContentStream Stream 
)
static

Definition at line 299 of file MinidumpYAML.cpp.

◆ streamMapping() [6/7]

static void streamMapping ( yaml::IO &  IO,
SystemInfoStream Stream 
)
static

Definition at line 340 of file MinidumpYAML.cpp.

References Info, mapOptional(), and mapOptionalHex().

◆ streamMapping() [7/7]

static void streamMapping ( yaml::IO &  IO,
TextContentStream Stream 
)
static

Definition at line 370 of file MinidumpYAML.cpp.

◆ streamValidate() [1/2]

static std::string streamValidate ( Memory64ListStream Stream)
static

Definition at line 328 of file MinidumpYAML.cpp.

◆ streamValidate() [2/2]

static std::string streamValidate ( RawContentStream Stream)
static

Definition at line 304 of file MinidumpYAML.cpp.