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