9 #ifndef LLVM_DEBUGINFO_CODEVIEW_TYPERECORD_H 10 #define LLVM_DEBUGINFO_CODEVIEW_TYPERECORD_H 56 : Attrs(static_cast<
uint16_t>(Access)) {}
59 Attrs =
static_cast<uint16_t>(Access);
60 Attrs |= (
static_cast<uint16_t>(
Kind) << MethodKindShift);
61 Attrs |=
static_cast<uint16_t>(Flags);
112 : ContainingType(ContainingType), Representation(Representation) {}
116 return Representation;
141 Modifiers(Modifiers) {}
159 CallConv(CallConv), Options(Options), ParameterCount(ParameterCount),
160 ArgumentList(ArgumentList) {}
184 TypeIndex ArgumentList, int32_t ThisPointerAdjustment)
186 ClassType(ClassType), ThisType(ThisType), CallConv(CallConv),
187 Options(Options), ParameterCount(ParameterCount),
188 ArgumentList(ArgumentList),
189 ThisPointerAdjustment(ThisPointerAdjustment) {}
207 int32_t ThisPointerAdjustment = 0;
229 FunctionType(FunctionType), Name(Name) {}
280 static const uint32_t PointerOptionMask = 0x381f00;
296 Attrs(calcAttrs(PK, PM, PO, Size)) {}
301 Attrs(calcAttrs(PK, PM, PO, Size)), MemberInfo(MPI) {}
320 return (
Attrs >> PointerSizeShift) & PointerSizeMask;
359 Attrs = calcAttrs(PK, PM, PO, Size);
368 A |= (
static_cast<uint32_t>(PM) << PointerModeShift);
408 IndexType(IndexType), Size(Size), Name(Name) {}
427 :
TypeRecord(Kind), MemberCount(MemberCount), Options(Options),
428 FieldList(FieldList), Name(Name), UniqueName(UniqueName) {}
431 static const int HfaKindShift = 11;
432 static const int HfaKindMask = 0x1800;
433 static const int WinRTKindShift = 14;
434 static const int WinRTKindMask = 0xC000;
478 :
TagRecord(Kind, MemberCount, Options, FieldList, Name, UniqueName),
479 DerivationList(DerivationList), VTableShape(VTableShape), Size(Size) {}
483 Value = (Value & HfaKindMask) >> HfaKindShift;
489 Value = (Value & WinRTKindMask) >> WinRTKindShift;
514 Value = (Value & HfaKindMask) >> HfaKindShift;
532 UnderlyingType(UnderlyingType) {}
546 BitOffset(BitOffset) {}
554 uint8_t BitOffset = 0;
568 if (!SlotsRef.empty())
586 assert(GuidStr.
size() == 16 &&
"guid isn't 16 bytes");
587 ::memcpy(Guid.Guid, GuidStr.
data(), 16);
621 FunctionType(FunctionType), Name(Name) {}
639 SourceFile(SourceFile), LineNumber(LineNumber) {}
658 SourceFile(SourceFile), LineNumber(LineNumber), Module(Module) {}
678 ArgIndices(ArgIndices.
begin(), ArgIndices.
end()) {}
704 OverriddenVFTable(OverriddenVFTable), VFPtrOffset(VFPtrOffset) {
705 MethodNames.push_back(Name);
706 MethodNames.insert(MethodNames.end(), Methods.
begin(), Methods.
end());
732 VFTableOffset(VFTableOffset), Name(Name) {}
736 Attrs(Access, MK, Options), VFTableOffset(VFTableOffset), Name(Name) {}
752 int32_t VFTableOffset = 0;
777 NumOverloads(NumOverloads), MethodList(MethodList), Name(Name) {}
796 FieldOffset(Offset), Name(Name) {}
800 FieldOffset(Offset), Name(Name) {}
809 uint64_t FieldOffset = 0;
841 Value(
std::move(Value)), Name(Name) {}
844 Value(
std::move(Value)), Name(Name) {}
897 :
TypeRecord(Kind), Attrs(Attrs), BaseType(BaseType),
898 VBPtrType(VBPtrType), VBPtrOffset(Offset), VTableIndex(Index) {}
903 VBPtrType(VBPtrType), VBPtrOffset(Offset), VTableIndex(Index) {}
914 uint64_t VBPtrOffset = 0;
915 uint64_t VTableIndex = 0;
926 ContinuationIndex(ContinuationIndex) {}
964 #endif // LLVM_DEBUGINFO_CODEVIEW_TYPERECORD_H TypeIndex getType() const
MemberAccess getAccess() const
PointerKind
Equivalent to CV_ptrtype_e.
TypeIndex getIndexType() const
const_iterator end(StringRef path)
Get end iterator over path.
uint8_t getBitSize() const
int32_t getThisPointerAdjustment() const
UdtSourceLineRecord(TypeRecordKind Kind)
MemberAccess getAccess() const
MemberAttributes(MemberAccess Access)
VirtualBaseClassRecord(TypeRecordKind Kind)
uint16_t getMemberCount() const
BuildInfoRecord(TypeRecordKind Kind)
const_iterator begin(StringRef path, Style style=Style::native)
Get begin iterator over path.
uint64_t getVBPtrOffset() const
uint32_t getSignature() const
TypeIndex getThisType() const
MemberFunctionRecord(TypeIndex ReturnType, TypeIndex ClassType, TypeIndex ThisType, CallingConvention CallConv, FunctionOptions Options, uint16_t ParameterCount, TypeIndex ArgumentList, int32_t ThisPointerAdjustment)
This class represents lattice values for constants.
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)
amdgpu Simplify well known AMD library false FunctionCallee Value const Twine & Name
StaticDataMemberRecord(MemberAttributes Attrs, TypeIndex Type, StringRef Name)
VirtualBaseClassRecord(TypeRecordKind Kind, MemberAttributes Attrs, TypeIndex BaseType, TypeIndex VBPtrType, uint64_t Offset, uint64_t Index)
TypeIndex getBaseType() const
StringRef getName() const
TypeIndex getType() const
bool isRValueReferenceThisPtr() const
ArrayRef< StringRef > getMethodNames() const
MemberAccess getAccess() const
This provides a very simple, boring adaptor for a begin and end iterator into a range type...
MemberAccess getAccess() const
uint32_t getEntryCount() const
StringIdRecord(TypeIndex Id, StringRef String)
BuildInfoRecord(ArrayRef< TypeIndex > ArgIndices)
NestedTypeRecord(TypeRecordKind Kind)
OverloadedMethodRecord(TypeRecordKind Kind)
TypeIndex getReferentType() const
MemberPointerInfo getMemberInfo() const
PointerRecord(TypeIndex ReferentType, uint32_t Attrs)
ClassRecord(TypeRecordKind Kind, uint16_t MemberCount, ClassOptions Options, TypeIndex FieldList, TypeIndex DerivationList, TypeIndex VTableShape, uint64_t Size, StringRef Name, StringRef UniqueName)
TypeIndex getType() const
FieldListRecord(TypeRecordKind Kind)
FieldListRecord(ArrayRef< uint8_t > Data)
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)
WindowsRTClassKind getWinRTKind() const
OneMethodRecord(TypeIndex Type, MemberAttributes Attrs, int32_t VFTableOffset, StringRef Name)
BitFieldRecord(TypeRecordKind Kind)
ArgListRecord(TypeRecordKind Kind)
MethodKind getMethodKind() const
uint32_t getLineNumber() const
OneMethodRecord(TypeIndex Type, MemberAccess Access, MethodKind MK, MethodOptions Options, int32_t VFTableOffset, StringRef Name)
TypeIndex getFunctionType() const
EnumRecord(uint16_t MemberCount, ClassOptions Options, TypeIndex FieldList, StringRef Name, StringRef UniqueName, TypeIndex UnderlyingType)
MemberFunctionRecord(TypeRecordKind Kind)
bool isForwardRef() const
PointerRecord(TypeIndex ReferentType, PointerKind PK, PointerMode PM, PointerOptions PO, uint8_t Size)
bool isLValueReferenceThisPtr() const
TypeIndex OverriddenVFTable
StringRef getName() const
bool hasUniqueName() const
DataMemberRecord(MemberAttributes Attrs, TypeIndex Type, uint64_t Offset, StringRef Name)
ArgListRecord(TypeRecordKind Kind, ArrayRef< TypeIndex > Indices)
StringRef getName() const
ArrayRef< T > makeArrayRef(const T &OneElt)
Construct an ArrayRef from a single element.
StringRef getName() const
StringRef getName() const
StringRef getName() const
uint16_t getParameterCount() const
ArrayRef< VFTableSlotKind > SlotsRef
This represents the 'GUID' type from windows.h.
LabelRecord(TypeRecordKind Kind)
uint64_t getBaseOffset() const
TypeIndex getContinuationIndex() const
Class to represent function types.
VirtualBaseClassRecord(TypeRecordKind Kind, MemberAccess Access, TypeIndex BaseType, TypeIndex VBPtrType, uint64_t Offset, uint64_t Index)
OneMethodRecord(TypeRecordKind Kind)
uint16_t getModule() const
TypeIndex getType() const
ClassOptions getOptions() const
ModifierOptions
Equivalent to CV_modifier_t.
BuildInfoArg
Indices of known build info arguments.
static MethodKind getMethodKind(uint16_t Attrs)
TypeIndex getFunctionType() const
LabelType
Equivalent to CV_LABEL_TYPE_e.
TypeIndex getBaseType() const
PointerRecord(TypeIndex ReferentType, PointerKind PK, PointerMode PM, PointerOptions PO, uint8_t Size, const MemberPointerInfo &MPI)
PointerMode getMode() const
LLVM_NODISCARD size_t size() const
size - Get the string size.
UdtSourceLineRecord(TypeIndex UDT, TypeIndex SourceFile, uint32_t LineNumber)
TypeIndex getElementType() const
TypeIndex getReturnType() const
CallingConvention getCallConv() const
TypeIndex ContinuationIndex
std::vector< TypeIndex > StringIndices
VFTableRecord(TypeIndex CompleteClass, TypeIndex OverriddenVFTable, uint32_t VFPtrOffset, StringRef Name, ArrayRef< StringRef > Methods)
MemberAccess getAccess() const
constexpr char Attrs[]
Key for Kernel::Metadata::mAttrs.
MethodKind
Part of member attribute flags. (CV_methodprop_e)
ModifierRecord(TypeIndex ModifiedType, ModifierOptions Modifiers)
ModifierRecord(TypeRecordKind Kind)
EnumeratorRecord(TypeRecordKind Kind)
TypeIndex getFieldList() const
StringRef getString() const
ArrayRef< TypeIndex > getArgs() const
VFTableRecord(TypeRecordKind Kind)
Full canonical command line (maybe -cc1)
TypeRecordKind
Distinguishes individual records in .debug$T or .debug$P section or PDB type stream.
PointerToMemberRepresentation getRepresentation() const
ListContinuationRecord(TypeRecordKind Kind)
FunctionOptions getOptions() 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
Absolute path of type server PDB (/Fd)
PointerRecord(TypeRecordKind Kind)
uint32_t getVFPtrOffset() const
bool isIntroducedVirtual() const
Does this member introduce a new virtual method.
Optional< MemberPointerInfo > MemberInfo
NestedTypeRecord(TypeIndex Type, StringRef Name)
LF_INDEX - Used to chain two large LF_FIELDLIST or LF_METHODLIST records together.
StringRef getUniqueName() const
TypeIndex getContainingType() const
std::vector< TypeIndex > ArgIndices
FuncIdRecord(TypeRecordKind Kind)
TypeIndex getArgumentList() const
StringListRecord(TypeRecordKind Kind, ArrayRef< TypeIndex > Indices)
TagRecord(TypeRecordKind Kind)
For method overload sets. LF_METHOD.
OverloadedMethodRecord(uint16_t NumOverloads, TypeIndex MethodList, StringRef Name)
TypeIndex getArgumentList() const
FuncIdRecord(TypeIndex ParentScope, TypeIndex FunctionType, StringRef Name)
MethodOptions getOptions() const
PointerKind getPointerKind() const
std::vector< StringRef > MethodNames
ArrayRecord(TypeRecordKind Kind)
bool isPointerToMember() const
TypeIndex getUnderlyingType() const
UdtModSourceLineRecord(TypeRecordKind Kind)
TypeIndex getMethodList() const
uint32_t getTypesCount() const
StringRef getName() const
TypeIndex getSourceFile() const
uint32_t getLineNumber() const
BaseClassRecord(MemberAttributes Attrs, TypeIndex Type, uint64_t Offset)
ListContinuationRecord(TypeIndex ContinuationIndex)
StringListRecord(TypeRecordKind Kind)
CallingConvention CallConv
ProcedureRecord(TypeIndex ReturnType, CallingConvention CallConv, FunctionOptions Options, uint16_t ParameterCount, TypeIndex ArgumentList)
PrecompRecord(TypeRecordKind Kind)
PointerOptions
Equivalent to misc lfPointerAttr bitfields.
BaseType
A given derived pointer can have multiple base pointers through phi/selects.
StringRef getName() const
MethodOverloadListRecord(TypeRecordKind Kind)
EndPrecompRecord(TypeRecordKind Kind)
int32_t getVFTableOffset() 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 getVTableShape() const
CallingConvention CallConv
MethodKind getMethodKind() const
Indicates if a method is defined with friend, virtual, static, etc.
bool isStatic() const
Is this method static.
MemberAccess getAccess() const
DataMemberRecord(MemberAccess Access, TypeIndex Type, uint64_t Offset, StringRef Name)
EnumeratorRecord(MemberAccess Access, APSInt Value, StringRef Name)
TypeIndex getOverriddenVTable() const
TypeRecord(TypeRecordKind Kind)
TypeIndex getReturnType() const
ArrayRef< OneMethodRecord > getMethods() const
PointerMode
Equivalent to CV_ptrmode_e.
VFTableShapeRecord(ArrayRef< VFTableSlotKind > Slots)
A range adaptor for a pair of iterators.
ArrayRef< TypeIndex > getIndices() const
uint8_t getBitOffset() const
TypeIndex getDerivationList() const
TypeIndex getParentScope() const
MemberFuncIdRecord(TypeRecordKind Kind)
ClassRecord(TypeRecordKind Kind)
TypeIndex getCompleteClass() const
MethodOptions
Equivalent to CV_fldattr_t bitfield.
bool isVirtual() const
Is this method virtual.
void setAttrs(PointerKind PK, PointerMode PM, PointerOptions PO, uint8_t Size)
std::vector< OneMethodRecord > Methods
TypeIndex getNestedType() const
MemberFuncIdRecord(TypeIndex ClassType, TypeIndex FunctionType, StringRef Name)
const GUID & getGuid() const
VFTableShapeRecord(std::vector< VFTableSlotKind > Slots)
StringRef getPrecompFilePath() const
CallingConvention getCallConv() const
Path to main source file, relative or absolute.
detail::packed_endian_specific_integral< int32_t, little, unaligned > little32_t
VFTableShapeRecord(TypeRecordKind Kind)
ArrayRef< TypeIndex > getIndices() const
StaticDataMemberRecord(TypeRecordKind Kind)
PointerOptions getOptions() const
StringRef getName() const
uint16_t getNumOverloads() const
ArrayRecord(TypeIndex ElementType, TypeIndex IndexType, uint64_t Size, StringRef Name)
uint64_t getVTableIndex() const
TypeIndex getType() const
FunctionOptions getOptions() const
EnumeratorRecord(MemberAttributes Attrs, APSInt Value, StringRef Name)
PointerToMemberRepresentation
Equivalent to CV_pmtype_e.
VFPtrRecord(TypeIndex Type)
ProcedureRecord(TypeRecordKind Kind)
StringRef PrecompFilePath
StringIdRecord(TypeRecordKind Kind)
uint16_t getParameterCount() const
LLVM_NODISCARD const char * data() const
data - Get a pointer to the start of the string (which may not be null terminated).
MemberAccess
Source-level access specifier. (CV_access_e)
DataMemberRecord(TypeRecordKind Kind)
uint64_t getFieldOffset() const
assert(ImpDefSCC.getReg()==AMDGPU::SCC &&ImpDefSCC.isDef())
MethodOptions getFlags() const
Get the flags that are not included in access control or method properties.
std::vector< VFTableSlotKind > Slots
BaseClassRecord(MemberAccess Access, TypeIndex Type, uint64_t Offset)
ArrayRef< VFTableSlotKind > getSlots() const
TypeIndex getVBPtrType() const
BaseClassRecord(TypeRecordKind Kind)
Equvalent to CV_fldattr_t in cvinfo.h.
UnionRecord(TypeRecordKind Kind)
LLVM Value Representation.
StringRef getName() const
EnumRecord(TypeRecordKind Kind)
TypeRecordKind getKind() const
CallingConvention
These values correspond to the CV_call_e enumeration, and are documented at the following locations: ...
uint32_t getStartTypeIndex() const
StringRef getName() const
VFPtrRecord(TypeRecordKind Kind)
TypeIndex getModifiedType() const
TypeIndex getSourceFile() const
StringRef - Represent a constant reference to a string, i.e.
bool containsNestedClass() const
TypeIndex getClassType() const
uint32_t getSignature() const
SmallVector< TypeIndex, MaxArgs > ArgIndices
UdtModSourceLineRecord(TypeIndex UDT, TypeIndex SourceFile, uint32_t LineNumber, uint16_t Module)
MemberAccess getAccess() const
Get the access specifier. Valid for any kind of member.
MemberPointerInfo(TypeIndex ContainingType, PointerToMemberRepresentation Representation)
MemberAttributes(MemberAccess Access, MethodKind Kind, MethodOptions Flags)
PointerToMemberRepresentation Representation
TypeIndex getClassType() const
StringRef getName() const
ModifierOptions getModifiers() const
bool isIntroducingVirtual() const