LLVM 20.0.0git
Classes | Namespaces | Macros | Functions
CodeViewYAMLTypes.cpp File Reference
#include "llvm/ObjectYAML/CodeViewYAMLTypes.h"
#include "llvm/ADT/APSInt.h"
#include "llvm/ADT/ArrayRef.h"
#include "llvm/ADT/StringRef.h"
#include "llvm/BinaryFormat/COFF.h"
#include "llvm/DebugInfo/CodeView/AppendingTypeTableBuilder.h"
#include "llvm/DebugInfo/CodeView/CVTypeVisitor.h"
#include "llvm/DebugInfo/CodeView/CodeView.h"
#include "llvm/DebugInfo/CodeView/CodeViewError.h"
#include "llvm/DebugInfo/CodeView/ContinuationRecordBuilder.h"
#include "llvm/DebugInfo/CodeView/TypeDeserializer.h"
#include "llvm/DebugInfo/CodeView/TypeIndex.h"
#include "llvm/DebugInfo/CodeView/TypeVisitorCallbacks.h"
#include "llvm/Support/Allocator.h"
#include "llvm/Support/BinaryStreamReader.h"
#include "llvm/Support/BinaryStreamWriter.h"
#include "llvm/Support/Endian.h"
#include "llvm/Support/Error.h"
#include "llvm/Support/ErrorHandling.h"
#include "llvm/Support/YAMLTraits.h"
#include "llvm/Support/raw_ostream.h"
#include <algorithm>
#include <cassert>
#include <cstdint>
#include <vector>
#include "llvm/DebugInfo/CodeView/CodeViewTypes.def"

Go to the source code of this file.

Classes

struct  llvm::CodeViewYAML::detail::LeafRecordBase
 
struct  llvm::CodeViewYAML::detail::LeafRecordImpl< T >
 
struct  llvm::CodeViewYAML::detail::LeafRecordImpl< FieldListRecord >
 
struct  llvm::CodeViewYAML::detail::MemberRecordBase
 
struct  llvm::CodeViewYAML::detail::MemberRecordImpl< T >
 
struct  llvm::yaml::MappingTraits< LeafRecordBase >
 
struct  llvm::yaml::MappingTraits< MemberRecordBase >
 

Namespaces

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

Macros

#define CV_TYPE(name, val)   io.enumCase(Value, #name, name);
 
#define TYPE_RECORD(EnumName, EnumVal, Name)
 
#define MEMBER_RECORD(EnumName, EnumVal, Name)
 
#define TYPE_RECORD_ALIAS(EnumName, EnumVal, Name, AliasName)
 
#define MEMBER_RECORD_ALIAS(EnumName, EnumVal, Name, AliasName)
 
#define TYPE_RECORD(EnumName, EnumVal, ClassName)
 
#define TYPE_RECORD_ALIAS(EnumName, EnumVal, AliasName, ClassName)    TYPE_RECORD(EnumName, EnumVal, ClassName)
 
#define MEMBER_RECORD(EnumName, EnumVal, ClassName)
 
#define MEMBER_RECORD_ALIAS(EnumName, EnumVal, AliasName, ClassName)
 
#define TYPE_RECORD(EnumName, EnumVal, ClassName)
 
#define TYPE_RECORD_ALIAS(EnumName, EnumVal, AliasName, ClassName)    TYPE_RECORD(EnumName, EnumVal, ClassName)
 
#define MEMBER_RECORD(EnumName, EnumVal, ClassName)
 
#define MEMBER_RECORD_ALIAS(EnumName, EnumVal, AliasName, ClassName)
 
#define MEMBER_RECORD(EnumName, EnumVal, ClassName)
 
#define MEMBER_RECORD_ALIAS(EnumName, EnumVal, AliasName, ClassName)    MEMBER_RECORD(EnumName, EnumVal, ClassName)
 
#define TYPE_RECORD(EnumName, EnumVal, ClassName)
 
#define TYPE_RECORD_ALIAS(EnumName, EnumVal, AliasName, ClassName)
 

Functions

template<typename T >
static Expected< LeafRecordfromCodeViewRecordImpl (CVType Type)
 
template<typename ConcreteType >
static void mapLeafRecordImpl (IO &IO, const char *Class, TypeLeafKind Kind, LeafRecord &Obj)
 
template<typename ConcreteType >
static void mapMemberRecordImpl (IO &IO, const char *Class, TypeLeafKind Kind, MemberRecord &Obj)
 

Macro Definition Documentation

◆ CV_TYPE

#define CV_TYPE (   name,
  val 
)    io.enumCase(Value, #name, name);

◆ MEMBER_RECORD [1/4]

#define MEMBER_RECORD (   EnumName,
  EnumVal,
  ClassName 
)

Definition at line 471 of file CodeViewYAMLTypes.cpp.

◆ MEMBER_RECORD [2/4]

#define MEMBER_RECORD (   EnumName,
  EnumVal,
  ClassName 
)

Definition at line 471 of file CodeViewYAMLTypes.cpp.

◆ MEMBER_RECORD [3/4]

#define MEMBER_RECORD (   EnumName,
  EnumVal,
  ClassName 
)
Value:
case EnumName: \
mapMemberRecordImpl<ClassName##Record>(IO, #ClassName, Kind, Obj); \
break;
StringLiteral EnumName

Definition at line 471 of file CodeViewYAMLTypes.cpp.

◆ MEMBER_RECORD [4/4]

#define MEMBER_RECORD (   EnumName,
  EnumVal,
  Name 
)
Value:
return visitKnownMemberImpl(Record); \
}
static Error visitKnownMember(CVMemberRecord &Record, TypeVisitorCallbacks &Callbacks)
std::string Name
Lightweight error class with error context and mandatory checking.
Definition: Error.h:160

Definition at line 471 of file CodeViewYAMLTypes.cpp.

◆ MEMBER_RECORD_ALIAS [1/4]

#define MEMBER_RECORD_ALIAS (   EnumName,
  EnumVal,
  AliasName,
  ClassName 
)

Definition at line 476 of file CodeViewYAMLTypes.cpp.

◆ MEMBER_RECORD_ALIAS [2/4]

#define MEMBER_RECORD_ALIAS (   EnumName,
  EnumVal,
  AliasName,
  ClassName 
)

Definition at line 476 of file CodeViewYAMLTypes.cpp.

◆ MEMBER_RECORD_ALIAS [3/4]

#define MEMBER_RECORD_ALIAS (   EnumName,
  EnumVal,
  AliasName,
  ClassName 
)     MEMBER_RECORD(EnumName, EnumVal, ClassName)

Definition at line 476 of file CodeViewYAMLTypes.cpp.

◆ MEMBER_RECORD_ALIAS [4/4]

#define MEMBER_RECORD_ALIAS (   EnumName,
  EnumVal,
  Name,
  AliasName 
)

Definition at line 476 of file CodeViewYAMLTypes.cpp.

◆ TYPE_RECORD [1/4]

#define TYPE_RECORD (   EnumName,
  EnumVal,
  ClassName 
)
Value:
case EnumName: \
return fromCodeViewRecordImpl<ClassName##Record>(Type);
The instances of the Type class are immutable: once they are created, they are never changed.
Definition: Type.h:45

Definition at line 470 of file CodeViewYAMLTypes.cpp.

◆ TYPE_RECORD [2/4]

#define TYPE_RECORD (   EnumName,
  EnumVal,
  ClassName 
)
Value:
case EnumName: \
mapLeafRecordImpl<ClassName##Record>(IO, #ClassName, Kind, Obj); \
break;

Definition at line 470 of file CodeViewYAMLTypes.cpp.

◆ TYPE_RECORD [3/4]

#define TYPE_RECORD (   EnumName,
  EnumVal,
  ClassName 
)

Definition at line 470 of file CodeViewYAMLTypes.cpp.

◆ TYPE_RECORD [4/4]

#define TYPE_RECORD (   EnumName,
  EnumVal,
  Name 
)

Definition at line 470 of file CodeViewYAMLTypes.cpp.

◆ TYPE_RECORD_ALIAS [1/4]

#define TYPE_RECORD_ALIAS (   EnumName,
  EnumVal,
  AliasName,
  ClassName 
)     TYPE_RECORD(EnumName, EnumVal, ClassName)

Definition at line 475 of file CodeViewYAMLTypes.cpp.

◆ TYPE_RECORD_ALIAS [2/4]

#define TYPE_RECORD_ALIAS (   EnumName,
  EnumVal,
  AliasName,
  ClassName 
)     TYPE_RECORD(EnumName, EnumVal, ClassName)

Definition at line 475 of file CodeViewYAMLTypes.cpp.

◆ TYPE_RECORD_ALIAS [3/4]

#define TYPE_RECORD_ALIAS (   EnumName,
  EnumVal,
  AliasName,
  ClassName 
)

Definition at line 475 of file CodeViewYAMLTypes.cpp.

◆ TYPE_RECORD_ALIAS [4/4]

#define TYPE_RECORD_ALIAS (   EnumName,
  EnumVal,
  Name,
  AliasName 
)

Definition at line 475 of file CodeViewYAMLTypes.cpp.

Function Documentation

◆ fromCodeViewRecordImpl()

template<typename T >
static Expected< LeafRecord > fromCodeViewRecordImpl ( CVType  Type)
inlinestatic

Definition at line 678 of file CodeViewYAMLTypes.cpp.

References llvm::codeview::EC.

◆ mapLeafRecordImpl()

template<typename ConcreteType >
static void mapLeafRecordImpl ( IO &  IO,
const char Class,
TypeLeafKind  Kind,
LeafRecord Obj 
)
static

Definition at line 724 of file CodeViewYAMLTypes.cpp.

References llvm::CodeViewYAML::LeafRecord::Leaf.

◆ mapMemberRecordImpl()

template<typename ConcreteType >
static void mapMemberRecordImpl ( IO &  IO,
const char Class,
TypeLeafKind  Kind,
MemberRecord Obj 
)
static

Definition at line 756 of file CodeViewYAMLTypes.cpp.

References llvm::CodeViewYAML::MemberRecord::Member.