9#ifndef LLVM_DEBUGINFO_CODEVIEW_TYPERECORD_H
10#define LLVM_DEBUGINFO_CODEVIEW_TYPERECORD_H
581 assert(GuidStr.
size() == 16 &&
"guid isn't 16 bytes");
This file implements the APSInt class, which is a simple class that represents an arbitrary sized int...
Lightweight arrays that are backed by an arbitrary BinaryStream.
static GCRegistry::Add< ErlangGC > A("erlang", "erlang-compatible garbage collector")
assert(ImpDefSCC.getReg()==AMDGPU::SCC &&ImpDefSCC.isDef())
This file defines the SmallVector class.
An arbitrary precision integer that knows its signedness.
ArrayRef - Represent a constant reference to an array (0 or more elements consecutively in memory),...
ArrayRef< T > drop_front(size_t N=1) const
Drop the first N elements of the array.
const T & front() const
front - Get the first element.
size_t size() const
size - Get the array size.
bool empty() const
empty - Check if the array is empty.
Class to represent function types.
A Module instance is used to store all the information related to an LLVM module.
This is a 'vector' (really, a variable-sized array), optimized for the case when the array is small.
StringRef - Represent a constant reference to a string, i.e.
constexpr size_t size() const
size - Get the string size.
constexpr const char * data() const
data - Get a pointer to the start of the string (which may not be null terminated).
The instances of the Type class are immutable: once they are created, they are never changed.
LLVM Value Representation.
std::vector< TypeIndex > ArgIndices
ArrayRef< TypeIndex > getIndices() const
ArgListRecord(TypeRecordKind Kind, ArrayRef< TypeIndex > Indices)
ArgListRecord(TypeRecordKind Kind)
ArrayRecord(TypeIndex ElementType, TypeIndex IndexType, uint64_t Size, StringRef Name)
TypeIndex getElementType() const
TypeIndex getIndexType() const
ArrayRecord(TypeRecordKind Kind)
StringRef getName() const
BaseClassRecord(MemberAccess Access, TypeIndex Type, uint64_t Offset)
uint64_t getBaseOffset() const
TypeIndex getBaseType() const
MemberAccess getAccess() const
BaseClassRecord(MemberAttributes Attrs, TypeIndex Type, uint64_t Offset)
BaseClassRecord()=default
BaseClassRecord(TypeRecordKind Kind)
BitFieldRecord(TypeRecordKind Kind)
uint8_t getBitSize() const
TypeIndex getType() const
BitFieldRecord(TypeIndex Type, uint8_t BitSize, uint8_t BitOffset)
uint8_t getBitOffset() const
BuildInfoRecord()=default
BuildInfoRecord(TypeRecordKind Kind)
BuildInfoArg
Indices of known build info arguments.
@ CurrentDirectory
Absolute CWD path.
@ SourceFile
Path to main source file, relative or absolute.
@ BuildTool
Absolute compiler path.
@ CommandLine
Full canonical command line (maybe -cc1)
@ TypeServerPDB
Absolute path of type server PDB (/Fd)
BuildInfoRecord(ArrayRef< TypeIndex > ArgIndices)
SmallVector< TypeIndex, MaxArgs > ArgIndices
ArrayRef< TypeIndex > getArgs() const
WindowsRTClassKind getWinRTKind() const
ClassRecord(TypeRecordKind Kind, uint16_t MemberCount, ClassOptions Options, TypeIndex FieldList, TypeIndex DerivationList, TypeIndex VTableShape, uint64_t Size, StringRef Name, StringRef UniqueName)
ClassRecord(TypeRecordKind Kind)
TypeIndex getDerivationList() const
TypeIndex getVTableShape() const
MemberAccess getAccess() const
DataMemberRecord(MemberAttributes Attrs, TypeIndex Type, uint64_t Offset, StringRef Name)
DataMemberRecord()=default
StringRef getName() const
DataMemberRecord(TypeRecordKind Kind)
TypeIndex getType() const
uint64_t getFieldOffset() const
DataMemberRecord(MemberAccess Access, TypeIndex Type, uint64_t Offset, StringRef Name)
EndPrecompRecord(TypeRecordKind Kind)
uint32_t getSignature() const
EndPrecompRecord()=default
EnumRecord(TypeRecordKind Kind)
TypeIndex getUnderlyingType() const
EnumRecord(uint16_t MemberCount, ClassOptions Options, TypeIndex FieldList, StringRef Name, StringRef UniqueName, TypeIndex UnderlyingType)
EnumeratorRecord()=default
EnumeratorRecord(TypeRecordKind Kind)
StringRef getName() const
EnumeratorRecord(MemberAccess Access, APSInt Value, StringRef Name)
MemberAccess getAccess() const
EnumeratorRecord(MemberAttributes Attrs, APSInt Value, StringRef Name)
FieldListRecord()=default
FieldListRecord(TypeRecordKind Kind)
FieldListRecord(ArrayRef< uint8_t > Data)
FuncIdRecord(TypeIndex ParentScope, TypeIndex FunctionType, StringRef Name)
TypeIndex getFunctionType() const
StringRef getName() const
FuncIdRecord(TypeRecordKind Kind)
TypeIndex getParentScope() const
LabelRecord(TypeRecordKind Kind)
LabelRecord(LabelType Mode)
LF_INDEX - Used to chain two large LF_FIELDLIST or LF_METHODLIST records together.
TypeIndex getContinuationIndex() const
ListContinuationRecord(TypeRecordKind Kind)
ListContinuationRecord(TypeIndex ContinuationIndex)
ListContinuationRecord()=default
TypeIndex ContinuationIndex
TypeIndex getClassType() const
MemberFuncIdRecord(TypeRecordKind Kind)
StringRef getName() const
MemberFuncIdRecord()=default
MemberFuncIdRecord(TypeIndex ClassType, TypeIndex FunctionType, StringRef Name)
TypeIndex getFunctionType() const
TypeIndex getReturnType() const
int32_t getThisPointerAdjustment() const
TypeIndex getArgumentList() const
CallingConvention CallConv
MemberFunctionRecord()=default
uint16_t getParameterCount() const
int32_t ThisPointerAdjustment
TypeIndex getThisType() const
MemberFunctionRecord(TypeRecordKind Kind)
MemberFunctionRecord(TypeIndex ReturnType, TypeIndex ClassType, TypeIndex ThisType, CallingConvention CallConv, FunctionOptions Options, uint16_t ParameterCount, TypeIndex ArgumentList, int32_t ThisPointerAdjustment)
FunctionOptions getOptions() const
TypeIndex getClassType() const
CallingConvention getCallConv() const
TypeIndex getContainingType() const
MemberPointerInfo()=default
MemberPointerInfo(TypeIndex ContainingType, PointerToMemberRepresentation Representation)
PointerToMemberRepresentation Representation
PointerToMemberRepresentation getRepresentation() const
std::vector< OneMethodRecord > Methods
MethodOverloadListRecord(ArrayRef< OneMethodRecord > Methods)
MethodOverloadListRecord()=default
ArrayRef< OneMethodRecord > getMethods() const
MethodOverloadListRecord(TypeRecordKind Kind)
ModifierRecord(TypeIndex ModifiedType, ModifierOptions Modifiers)
ModifierOptions getModifiers() const
ModifierOptions Modifiers
ModifierRecord(TypeRecordKind Kind)
TypeIndex getModifiedType() const
StringRef getName() const
TypeIndex getNestedType() const
NestedTypeRecord(TypeIndex Type, StringRef Name)
NestedTypeRecord()=default
NestedTypeRecord(TypeRecordKind Kind)
int32_t getVFTableOffset() const
TypeIndex getType() const
bool isIntroducingVirtual() const
MemberAccess getAccess() const
OneMethodRecord(TypeRecordKind Kind)
OneMethodRecord()=default
MethodOptions getOptions() const
MethodKind getMethodKind() const
OneMethodRecord(TypeIndex Type, MemberAccess Access, MethodKind MK, MethodOptions Options, int32_t VFTableOffset, StringRef Name)
StringRef getName() const
OneMethodRecord(TypeIndex Type, MemberAttributes Attrs, int32_t VFTableOffset, StringRef Name)
For method overload sets. LF_METHOD.
OverloadedMethodRecord(TypeRecordKind Kind)
StringRef getName() const
uint16_t getNumOverloads() const
OverloadedMethodRecord()=default
OverloadedMethodRecord(uint16_t NumOverloads, TypeIndex MethodList, StringRef Name)
TypeIndex getMethodList() const
static const uint32_t PointerKindShift
bool isRValueReferenceThisPtr() const
static const uint32_t PointerModeShift
std::optional< MemberPointerInfo > MemberInfo
PointerRecord(TypeRecordKind Kind)
PointerRecord(TypeIndex ReferentType, PointerKind PK, PointerMode PM, PointerOptions PO, uint8_t Size)
static const uint32_t PointerOptionMask
TypeIndex getReferentType() const
PointerRecord(TypeIndex ReferentType, uint32_t Attrs)
MemberPointerInfo getMemberInfo() const
void setAttrs(PointerKind PK, PointerMode PM, PointerOptions PO, uint8_t Size)
bool isPointerToMember() const
bool isLValueReferenceThisPtr() const
static const uint32_t PointerSizeShift
PointerMode getMode() const
PointerRecord(TypeIndex ReferentType, PointerKind PK, PointerMode PM, PointerOptions PO, uint8_t Size, const MemberPointerInfo &MPI)
PointerKind getPointerKind() const
static const uint32_t PointerSizeMask
static const uint32_t PointerKindMask
PointerOptions getOptions() const
static const uint32_t PointerModeMask
uint32_t getSignature() const
StringRef PrecompFilePath
StringRef getPrecompFilePath() const
PrecompRecord(TypeRecordKind Kind)
uint32_t getTypesCount() const
uint32_t getStartTypeIndex() const
TypeIndex getReturnType() const
TypeIndex getArgumentList() const
uint16_t getParameterCount() const
FunctionOptions getOptions() const
ProcedureRecord()=default
ProcedureRecord(TypeIndex ReturnType, CallingConvention CallConv, FunctionOptions Options, uint16_t ParameterCount, TypeIndex ArgumentList)
ProcedureRecord(TypeRecordKind Kind)
CallingConvention getCallConv() const
CallingConvention CallConv
MemberAccess getAccess() const
StaticDataMemberRecord(MemberAccess Access, TypeIndex Type, StringRef Name)
StaticDataMemberRecord(TypeRecordKind Kind)
TypeIndex getType() const
StaticDataMemberRecord()=default
StaticDataMemberRecord(MemberAttributes Attrs, TypeIndex Type, StringRef Name)
StringRef getName() const
StringRef getString() const
StringIdRecord(TypeRecordKind Kind)
StringIdRecord(TypeIndex Id, StringRef String)
StringListRecord()=default
StringListRecord(TypeRecordKind Kind, ArrayRef< TypeIndex > Indices)
StringListRecord(TypeRecordKind Kind)
std::vector< TypeIndex > StringIndices
ArrayRef< TypeIndex > getIndices() const
ClassOptions getOptions() const
bool containsNestedClass() const
TagRecord(TypeRecordKind Kind)
static const int WinRTKindMask
uint16_t getMemberCount() const
static const int WinRTKindShift
TypeIndex getFieldList() const
StringRef getName() const
static const int HfaKindMask
TagRecord(TypeRecordKind Kind, uint16_t MemberCount, ClassOptions Options, TypeIndex FieldList, StringRef Name, StringRef UniqueName)
static const int HfaKindShift
StringRef getUniqueName() const
bool isForwardRef() const
bool hasUniqueName() const
TypeRecord(TypeRecordKind Kind)
TypeRecordKind getKind() const
StringRef getName() const
TypeServer2Record(TypeRecordKind Kind)
const GUID & getGuid() const
TypeServer2Record()=default
TypeServer2Record(StringRef GuidStr, uint32_t Age, StringRef Name)
UdtModSourceLineRecord()=default
TypeIndex getSourceFile() const
UdtModSourceLineRecord(TypeRecordKind Kind)
UdtModSourceLineRecord(TypeIndex UDT, TypeIndex SourceFile, uint32_t LineNumber, uint16_t Module)
uint16_t getModule() const
uint32_t getLineNumber() const
UdtSourceLineRecord(TypeIndex UDT, TypeIndex SourceFile, uint32_t LineNumber)
UdtSourceLineRecord(TypeRecordKind Kind)
uint32_t getLineNumber() const
UdtSourceLineRecord()=default
TypeIndex getSourceFile() const
VFPtrRecord(TypeRecordKind Kind)
VFPtrRecord(TypeIndex Type)
TypeIndex getType() const
uint32_t getVFPtrOffset() const
TypeIndex getOverriddenVTable() const
TypeIndex OverriddenVFTable
ArrayRef< StringRef > getMethodNames() const
VFTableRecord(TypeRecordKind Kind)
std::vector< StringRef > MethodNames
StringRef getName() const
TypeIndex getCompleteClass() const
VFTableRecord(TypeIndex CompleteClass, TypeIndex OverriddenVFTable, uint32_t VFPtrOffset, StringRef Name, ArrayRef< StringRef > Methods)
VFTableShapeRecord(std::vector< VFTableSlotKind > Slots)
VFTableShapeRecord(TypeRecordKind Kind)
ArrayRef< VFTableSlotKind > SlotsRef
VFTableShapeRecord()=default
VFTableShapeRecord(ArrayRef< VFTableSlotKind > Slots)
ArrayRef< VFTableSlotKind > getSlots() const
std::vector< VFTableSlotKind > Slots
uint32_t getEntryCount() const
uint64_t getVBPtrOffset() const
uint64_t getVTableIndex() const
VirtualBaseClassRecord(TypeRecordKind Kind, MemberAttributes Attrs, TypeIndex BaseType, TypeIndex VBPtrType, uint64_t Offset, uint64_t Index)
TypeIndex getBaseType() const
VirtualBaseClassRecord(TypeRecordKind Kind, MemberAccess Access, TypeIndex BaseType, TypeIndex VBPtrType, uint64_t Offset, uint64_t Index)
VirtualBaseClassRecord()=default
TypeIndex getVBPtrType() const
MemberAccess getAccess() const
VirtualBaseClassRecord(TypeRecordKind Kind)
PointerMode
Equivalent to CV_ptrmode_e.
@ PointerToMemberFunction
PointerOptions
Equivalent to misc lfPointerAttr bitfields.
MethodKind
Part of member attribute flags. (CV_methodprop_e)
PointerKind
Equivalent to CV_ptrtype_e.
PointerToMemberRepresentation
Equivalent to CV_pmtype_e.
CallingConvention
These values correspond to the CV_call_e enumeration, and are documented at the following locations: ...
MethodOptions
Equivalent to CV_fldattr_t bitfield.
MemberAccess
Source-level access specifier. (CV_access_e)
TypeLeafKind
Duplicate copy of the above enum, but using the official CV names.
TypeRecordKind
Distinguishes individual records in .debug$T or .debug$P section or PDB type stream.
ModifierOptions
Equivalent to CV_modifier_t.
LabelType
Equivalent to CV_LABEL_TYPE_e.
detail::packed_endian_specific_integral< uint16_t, llvm::endianness::little, unaligned > ulittle16_t
detail::packed_endian_specific_integral< uint32_t, llvm::endianness::little, unaligned > ulittle32_t
detail::packed_endian_specific_integral< int32_t, llvm::endianness::little, unaligned > little32_t
This is an optimization pass for GlobalISel generic memory operations.
void append_range(Container &C, Range &&R)
Wrapper function to append range R to container C.
OutputIt move(R &&Range, OutputIt Out)
Provide wrappers to std::move which take ranges instead of having to pass begin/end explicitly.
Implement std::hash so that hash_code can be used in STL containers.
This represents the 'GUID' type from windows.h.
Equvalent to CV_fldattr_t in cvinfo.h.
bool isIntroducedVirtual() const
Does this member introduce a new virtual method.
bool isVirtual() const
Is this method virtual.
MemberAttributes(MemberAccess Access, MethodKind Kind, MethodOptions Flags)
MethodKind getMethodKind() const
Indicates if a method is defined with friend, virtual, static, etc.
MethodOptions getFlags() const
Get the flags that are not included in access control or method properties.
MemberAccess getAccess() const
Get the access specifier. Valid for any kind of member.
bool isStatic() const
Is this method static.
MemberAttributes(MemberAccess Access)
MemberAttributes()=default
UnionRecord(uint16_t MemberCount, ClassOptions Options, TypeIndex FieldList, uint64_t Size, StringRef Name, StringRef UniqueName)
UnionRecord(TypeRecordKind Kind)