10 #ifndef LLVM_DEBUGINFO_CODEVIEW_TYPERECORD_H
11 #define LLVM_DEBUGINFO_CODEVIEW_TYPERECORD_H
57 :
Attrs(static_cast<uint16_t>(Access)) {}
60 Attrs =
static_cast<uint16_t
>(Access);
108 : ContainingType(ContainingType), Representation(Representation) {}
137 Modifiers(Modifiers) {}
155 CallConv(CallConv), Options(Options), ParameterCount(ParameterCount),
156 ArgumentList(ArgumentList) {}
182 ClassType(ClassType), ThisType(ThisType), CallConv(CallConv),
183 Options(Options), ParameterCount(ParameterCount),
184 ArgumentList(ArgumentList),
185 ThisPointerAdjustment(ThisPointerAdjustment) {}
225 FunctionType(FunctionType), Name(Name) {}
288 Attrs(calcAttrs(PK, PM, PO, Size)) {}
383 IndexType(IndexType), Size(Size), Name(Name) {}
402 :
TypeRecord(Kind), MemberCount(MemberCount), Options(Options),
403 FieldList(FieldList), Name(Name), UniqueName(UniqueName) {}
437 :
TagRecord(Kind, MemberCount, Options, FieldList, Name, UniqueName),
438 DerivationList(DerivationList), VTableShape(VTableShape), Size(Size) {}
443 return static_cast<HfaKind>(Value);
474 return static_cast<HfaKind>(Value);
491 UnderlyingType(UnderlyingType) {}
505 BitOffset(BitOffset) {}
545 assert(GuidStr.
size() == 16 &&
"guid isn't 16 bytes");
580 FunctionType(FunctionType), Name(Name) {}
598 SourceFile(SourceFile), LineNumber(LineNumber) {}
617 SourceFile(SourceFile), LineNumber(LineNumber), Module(Module) {}
637 ArgIndices(ArgIndices.
begin(), ArgIndices.
end()) {}
653 OverriddenVFTable(OverriddenVFTable), VFPtrOffset(VFPtrOffset) {
681 VFTableOffset(VFTableOffset), Name(Name) {}
685 Attrs(Access, MK, Options), VFTableOffset(VFTableOffset), Name(Name) {}
726 NumOverloads(NumOverloads), MethodList(MethodList), Name(Name) {}
790 Value(std::move(Value)), Name(Name) {}
793 Value(std::move(Value)), Name(Name) {}
845 uint64_t
Offset, uint64_t Index)
846 :
TypeRecord(Kind), Attrs(Attrs), BaseType(BaseType),
850 uint64_t
Offset, uint64_t Index)
875 ContinuationIndex(ContinuationIndex) {}
885 #endif // LLVM_DEBUGINFO_CODEVIEW_TYPERECORD_H
PointerKind
Equivalent to CV_ptrtype_e.
const_iterator end(StringRef path)
Get end iterator over path.
uint16_t getNumOverloads() const
CallingConvention getCallConv() const
UdtSourceLineRecord(TypeRecordKind Kind)
MemberAttributes(MemberAccess Access)
StringRef getName() const
TypeIndex getBaseType() const
VirtualBaseClassRecord(TypeRecordKind Kind)
TypeIndex getArgumentList() const
BuildInfoRecord(TypeRecordKind Kind)
const_iterator begin(StringRef path, Style style=Style::native)
Get begin iterator over path.
TypeIndex getSourceFile() const
MemberFunctionRecord(TypeIndex ReturnType, TypeIndex ClassType, TypeIndex ThisType, CallingConvention CallConv, FunctionOptions Options, uint16_t ParameterCount, TypeIndex ArgumentList, int32_t ThisPointerAdjustment)
MethodKind getMethodKind() const
LabelRecord(LabelType Mode)
A Module instance is used to store all the information related to an LLVM module. ...
TypeLeafKind
Duplicate copy of the above enum, but using the official CV names.
TagRecord(TypeRecordKind Kind, uint16_t MemberCount, ClassOptions Options, TypeIndex FieldList, StringRef Name, StringRef UniqueName)
MethodOverloadListRecord(ArrayRef< OneMethodRecord > Methods)
static const uint32_t PointerSizeMask
StaticDataMemberRecord(MemberAttributes Attrs, TypeIndex Type, StringRef Name)
VirtualBaseClassRecord(TypeRecordKind Kind, MemberAttributes Attrs, TypeIndex BaseType, TypeIndex VBPtrType, uint64_t Offset, uint64_t Index)
This provides a very simple, boring adaptor for a begin and end iterator into a range type...
MethodOptions getFlags() const
Get the flags that are not included in access control or method properties.
MethodOptions getOptions() const
TypeServer2Record()=default
WindowsRTClassKind getWinRTKind() const
StringIdRecord(TypeIndex Id, StringRef String)
ArrayRef< TypeIndex > getArgs() const
BuildInfoRecord(ArrayRef< TypeIndex > ArgIndices)
NestedTypeRecord(TypeRecordKind Kind)
OverloadedMethodRecord(TypeRecordKind Kind)
PointerRecord(TypeIndex ReferentType, uint32_t Attrs)
ArrayRef< TypeIndex > getIndices() const
ClassRecord(TypeRecordKind Kind, uint16_t MemberCount, ClassOptions Options, TypeIndex FieldList, TypeIndex DerivationList, TypeIndex VTableShape, uint64_t Size, StringRef Name, StringRef UniqueName)
TypeIndex getElementType() const
FieldListRecord(TypeRecordKind Kind)
FieldListRecord(ArrayRef< uint8_t > Data)
static const uint32_t PointerSizeShift
StringListRecord()=default
TypeServer2Record(StringRef GuidStr, uint32_t Age, StringRef Name)
detail::packed_endian_specific_integral< uint16_t, little, unaligned > ulittle16_t
TypeServer2Record(TypeRecordKind Kind)
BitFieldRecord(TypeIndex Type, uint8_t BitSize, uint8_t BitOffset)
NestedTypeRecord()=default
TypeIndex getFunctionType() const
OneMethodRecord(TypeIndex Type, MemberAttributes Attrs, int32_t VFTableOffset, StringRef Name)
BitFieldRecord(TypeRecordKind Kind)
ArgListRecord(TypeRecordKind Kind)
TypeIndex getOverriddenVTable() const
CallingConvention getCallConv() const
uint32_t getLineNumber() const
OneMethodRecord(TypeIndex Type, MemberAccess Access, MethodKind MK, MethodOptions Options, int32_t VFTableOffset, StringRef Name)
EnumRecord(uint16_t MemberCount, ClassOptions Options, TypeIndex FieldList, StringRef Name, StringRef UniqueName, TypeIndex UnderlyingType)
MemberFunctionRecord(TypeRecordKind Kind)
uint64_t getVBPtrOffset() const
PointerRecord(TypeIndex ReferentType, PointerKind PK, PointerMode PM, PointerOptions PO, uint8_t Size)
TypeIndex OverriddenVFTable
StaticDataMemberRecord()=default
MemberAccess getAccess() const
DataMemberRecord(MemberAttributes Attrs, TypeIndex Type, uint64_t Offset, StringRef Name)
ArgListRecord(TypeRecordKind Kind, ArrayRef< TypeIndex > Indices)
uint64_t getBaseOffset() const
TypeRecordKind getKind() const
TypeIndex getClassType() const
MemberAttributes()=default
ArrayRef< T > makeArrayRef(const T &OneElt)
Construct an ArrayRef from a single element.
StringRef getName() const
UdtSourceLineRecord()=default
MemberAccess getAccess() const
StringRef getString() const
bool isPointerToMember() const
ArrayRef< VFTableSlotKind > SlotsRef
StringRef getName() const
TypeIndex getReturnType() const
This represents the 'GUID' type from windows.h.
LabelRecord(TypeRecordKind Kind)
bool isIntroducingVirtual() const
TypeIndex getBaseType() const
TypeIndex getParentScope() const
TypeIndex getContainingType() const
Class to represent function types.
VirtualBaseClassRecord(TypeRecordKind Kind, MemberAccess Access, TypeIndex BaseType, TypeIndex VBPtrType, uint64_t Offset, uint64_t Index)
OneMethodRecord(TypeRecordKind Kind)
ModifierOptions
Equivalent to CV_modifier_t.
LabelType
Equivalent to CV_LABEL_TYPE_e.
MemberFuncIdRecord()=default
uint16_t getMemberCount() const
PointerRecord(TypeIndex ReferentType, PointerKind PK, PointerMode PM, PointerOptions PO, uint8_t Size, const MemberPointerInfo &MPI)
TypeIndex getThisType() const
UdtSourceLineRecord(TypeIndex UDT, TypeIndex SourceFile, uint32_t LineNumber)
TypeIndex ContinuationIndex
OverloadedMethodRecord()=default
std::vector< TypeIndex > StringIndices
VFTableRecord(TypeIndex CompleteClass, TypeIndex OverriddenVFTable, uint32_t VFPtrOffset, StringRef Name, ArrayRef< StringRef > Methods)
TypeIndex getFunctionType() const
uint16_t getParameterCount() const
MemberAccess getAccess() const
LLVM_NODISCARD LLVM_ATTRIBUTE_ALWAYS_INLINE size_t size() const
size - Get the string size.
MethodKind
Part of member attribute flags. (CV_methodprop_e)
ModifierRecord(TypeIndex ModifiedType, ModifierOptions Modifiers)
StringRef getName() const
TypeIndex getReturnType() const
size_t size() const
size - Get the array size.
ModifierRecord(TypeRecordKind Kind)
EnumeratorRecord(TypeRecordKind Kind)
StringRef getName() const
TypeIndex getContinuationIndex() const
VFTableRecord(TypeRecordKind Kind)
TypeRecordKind
Distinguishes individual records in .debug$T section or PDB type stream.
static const int WinRTKindMask
uint16_t getParameterCount() const
static const uint32_t PointerKindMask
TypeIndex getVBPtrType() const
ListContinuationRecord(TypeRecordKind Kind)
ProcedureRecord()=default
static const uint32_t PointerKindShift
bool isVirtual() const
Is this method virtual.
PointerToMemberRepresentation getRepresentation() const
bool hasUniqueName() const
The instances of the Type class are immutable: once they are created, they are never changed...
detail::packed_endian_specific_integral< uint32_t, little, unaligned > ulittle32_t
PointerRecord(TypeRecordKind Kind)
StringRef getName() const
Optional< MemberPointerInfo > MemberInfo
NestedTypeRecord(TypeIndex Type, StringRef Name)
StringRef getName() const
LF_INDEX - Used to chain two large LF_FIELDLIST or LF_METHODLIST records together.
uint32_t getLineNumber() const
TypeIndex getType() const
std::vector< TypeIndex > ArgIndices
FuncIdRecord(TypeRecordKind Kind)
TypeIndex getType() const
StringListRecord(TypeRecordKind Kind, ArrayRef< TypeIndex > Indices)
ArrayRef< OneMethodRecord > getMethods() const
TagRecord(TypeRecordKind Kind)
static const int WinRTKindShift
For method overload sets. LF_METHOD.
OverloadedMethodRecord(uint16_t NumOverloads, TypeIndex MethodList, StringRef Name)
StringRef getName() const
FuncIdRecord(TypeIndex ParentScope, TypeIndex FunctionType, StringRef Name)
uint8_t getBitSize() const
VFTableShapeRecord()=default
MemberPointerInfo()=default
std::vector< StringRef > MethodNames
ModifierOptions Modifiers
ArrayRecord(TypeRecordKind Kind)
FunctionOptions getOptions() const
bool empty() const
empty - Check if the array is empty.
UdtModSourceLineRecord(TypeRecordKind Kind)
bool isIntroducedVirtual() const
Does this member introduce a new virtual method.
ArrayRef< StringRef > getMethodNames() const
uint16_t getModule() const
const GUID & getGuid() const
BaseClassRecord(MemberAttributes Attrs, TypeIndex Type, uint64_t Offset)
DataMemberRecord()=default
uint32_t getEntryCount() const
ListContinuationRecord(TypeIndex ContinuationIndex)
StringListRecord(TypeRecordKind Kind)
CallingConvention CallConv
MemberAccess getAccess() const
Get the access specifier. Valid for any kind of member.
ModifierOptions getModifiers() const
BaseClassRecord()=default
ProcedureRecord(TypeIndex ReturnType, CallingConvention CallConv, FunctionOptions Options, uint16_t ParameterCount, TypeIndex ArgumentList)
ClassOptions getOptions() const
PointerOptions
Equivalent to misc lfPointerAttr bitfields.
BaseType
A given derived pointer can have multiple base pointers through phi/selects.
int32_t ThisPointerAdjustment
ListContinuationRecord()=default
MethodOverloadListRecord(TypeRecordKind Kind)
VirtualBaseClassRecord()=default
TypeIndex getCompleteClass() const
UnionRecord(uint16_t MemberCount, ClassOptions Options, TypeIndex FieldList, uint64_t Size, StringRef Name, StringRef UniqueName)
This is a 'vector' (really, a variable-sized array), optimized for the case when the array is small...
StaticDataMemberRecord(MemberAccess Access, TypeIndex Type, StringRef Name)
TypeIndex getIndexType() const
CallingConvention CallConv
TypeIndex getClassType() const
MemberFunctionRecord()=default
MemberAccess getAccess() const
PointerMode getMode() const
DataMemberRecord(MemberAccess Access, TypeIndex Type, uint64_t Offset, StringRef Name)
MethodKind getMethodKind() const
Indicates if a method is defined with friend, virtual, static, etc.
EnumeratorRecord(MemberAccess Access, APSInt Value, StringRef Name)
TypeRecord(TypeRecordKind Kind)
PointerMode
Equivalent to CV_ptrmode_e.
VFTableShapeRecord(ArrayRef< VFTableSlotKind > Slots)
BuildInfoRecord()=default
A range adaptor for a pair of iterators.
TypeIndex getVTableShape() const
static const uint32_t PointerModeMask
MemberFuncIdRecord(TypeRecordKind Kind)
ClassRecord(TypeRecordKind Kind)
EnumeratorRecord()=default
MethodOptions
Equivalent to CV_fldattr_t bitfield.
TypeIndex getFieldList() const
constexpr char Size[]
Key for Kernel::Arg::Metadata::mSize.
static const uint32_t PointerOptionMask
static std::vector< std::string > Flags
std::vector< OneMethodRecord > Methods
static const uint32_t PointerModeShift
MemberFuncIdRecord(TypeIndex ClassType, TypeIndex FunctionType, StringRef Name)
static const int HfaKindShift
StringRef getName() const
TypeIndex getModifiedType() const
TypeIndex getType() const
VFTableShapeRecord(std::vector< VFTableSlotKind > Slots)
ArrayRef< TypeIndex > getIndices() const
TypeIndex getArgumentList() const
SmallVector< TypeIndex, 4 > ArgIndices
StringRef getName() const
FunctionOptions getOptions() const
uint32_t getVFPtrOffset() const
detail::packed_endian_specific_integral< int32_t, little, unaligned > little32_t
VFTableShapeRecord(TypeRecordKind Kind)
StaticDataMemberRecord(TypeRecordKind Kind)
MemberPointerInfo getMemberInfo() const
ArrayRecord(TypeIndex ElementType, TypeIndex IndexType, uint64_t Size, StringRef Name)
TypeIndex getType() const
EnumeratorRecord(MemberAttributes Attrs, APSInt Value, StringRef Name)
TypeIndex getNestedType() const
PointerToMemberRepresentation
Equivalent to CV_pmtype_e.
VFPtrRecord(TypeIndex Type)
PointerKind getPointerKind() const
ProcedureRecord(TypeRecordKind Kind)
StringIdRecord(TypeRecordKind Kind)
MethodOverloadListRecord()=default
MemberAccess
Source-level access specifier. (CV_access_e)
DataMemberRecord(TypeRecordKind Kind)
TypeIndex getMethodList() const
assert(ImpDefSCC.getReg()==AMDGPU::SCC &&ImpDefSCC.isDef())
std::vector< VFTableSlotKind > Slots
BaseClassRecord(MemberAccess Access, TypeIndex Type, uint64_t Offset)
uint64_t getFieldOffset() const
MemberAccess getAccess() const
uint8_t getBitOffset() const
BaseClassRecord(TypeRecordKind Kind)
Equvalent to CV_fldattr_t in cvinfo.h.
UnionRecord(TypeRecordKind Kind)
LLVM Value Representation.
TypeIndex getSourceFile() const
OneMethodRecord()=default
EnumRecord(TypeRecordKind Kind)
CallingConvention
These values correspond to the CV_call_e enumeration, and are documented at the following locations: ...
ArrayRef< VFTableSlotKind > getSlots() const
PointerOptions getOptions() const
LLVM_NODISCARD LLVM_ATTRIBUTE_ALWAYS_INLINE const char * data() const
data - Get a pointer to the start of the string (which may not be null terminated).
VFPtrRecord(TypeRecordKind Kind)
UdtModSourceLineRecord()=default
StringRef - Represent a constant reference to a string, i.e.
TypeIndex getUnderlyingType() const
StringRef getUniqueName() const
int32_t getVFTableOffset() const
TypeIndex getType() const
MemberAccess getAccess() const
int32_t getThisPointerAdjustment() const
UdtModSourceLineRecord(TypeIndex UDT, TypeIndex SourceFile, uint32_t LineNumber, uint16_t Module)
TypeIndex getDerivationList() const
uint64_t getVTableIndex() const
MemberPointerInfo(TypeIndex ContainingType, PointerToMemberRepresentation Representation)
MemberAttributes(MemberAccess Access, MethodKind Kind, MethodOptions Flags)
PointerToMemberRepresentation Representation
TypeIndex getReferentType() const
FieldListRecord()=default
StringRef getName() const
static const int HfaKindMask
StringRef getName() const