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);
61 Attrs |= (
static_cast<uint16_t
>(
Kind) << MethodKindShift);
62 Attrs |=
static_cast<uint16_t
>(Flags);
113 : ContainingType(ContainingType), Representation(Representation) {}
117 return Representation;
142 Modifiers(Modifiers) {}
160 CallConv(CallConv), Options(Options), ParameterCount(ParameterCount),
161 ArgumentList(ArgumentList) {}
185 TypeIndex ArgumentList, int32_t ThisPointerAdjustment)
187 ClassType(ClassType), ThisType(ThisType), CallConv(CallConv),
188 Options(Options), ParameterCount(ParameterCount),
189 ArgumentList(ArgumentList),
190 ThisPointerAdjustment(ThisPointerAdjustment) {}
230 FunctionType(FunctionType), Name(Name) {}
281 static const uint32_t PointerOptionMask = 0x381f00;
297 Attrs(calcAttrs(PK, PM, PO, Size)) {}
302 Attrs(calcAttrs(PK, PM, PO, Size)), MemberInfo(MPI) {}
321 return (
Attrs >> PointerSizeShift) & PointerSizeMask;
360 Attrs = calcAttrs(PK, PM, PO, Size);
369 A |= (
static_cast<uint32_t>(PM) << PointerModeShift);
409 IndexType(IndexType), Size(Size), Name(Name) {}
428 :
TypeRecord(Kind), MemberCount(MemberCount), Options(Options),
429 FieldList(FieldList), Name(Name), UniqueName(UniqueName) {}
432 static const int HfaKindShift = 11;
433 static const int HfaKindMask = 0x1800;
434 static const int WinRTKindShift = 14;
435 static const int WinRTKindMask = 0xC000;
479 :
TagRecord(Kind, MemberCount, Options, FieldList, Name, UniqueName),
480 DerivationList(DerivationList), VTableShape(VTableShape), Size(Size) {}
483 uint16_t
Value =
static_cast<uint16_t
>(Options);
484 Value = (Value & HfaKindMask) >> HfaKindShift;
485 return static_cast<HfaKind>(Value);
489 uint16_t
Value =
static_cast<uint16_t
>(Options);
490 Value = (Value & WinRTKindMask) >> WinRTKindShift;
514 uint16_t
Value =
static_cast<uint16_t
>(Options);
515 Value = (Value & HfaKindMask) >> HfaKindShift;
516 return static_cast<HfaKind>(Value);
533 UnderlyingType(UnderlyingType) {}
547 BitOffset(BitOffset) {}
569 if (!SlotsRef.empty())
587 assert(GuidStr.
size() == 16 &&
"guid isn't 16 bytes");
622 FunctionType(FunctionType), Name(Name) {}
640 SourceFile(SourceFile), LineNumber(LineNumber) {}
659 SourceFile(SourceFile), LineNumber(LineNumber), Module(Module) {}
679 ArgIndices(ArgIndices.
begin(), ArgIndices.
end()) {}
705 OverriddenVFTable(OverriddenVFTable), VFPtrOffset(VFPtrOffset) {
706 MethodNames.push_back(Name);
707 MethodNames.insert(MethodNames.end(), Methods.
begin(), Methods.
end());
733 VFTableOffset(VFTableOffset), Name(Name) {}
737 Attrs(Access, MK, Options), VFTableOffset(VFTableOffset), Name(Name) {}
778 NumOverloads(NumOverloads), MethodList(MethodList), Name(Name) {}
797 FieldOffset(Offset), Name(Name) {}
801 FieldOffset(Offset), Name(Name) {}
842 Value(
std::move(Value)), Name(Name) {}
845 Value(
std::move(Value)), Name(Name) {}
898 :
TypeRecord(Kind), Attrs(Attrs), BaseType(BaseType),
899 VBPtrType(VBPtrType), VBPtrOffset(Offset), VTableIndex(Index) {}
904 VBPtrType(VBPtrType), VBPtrOffset(Offset), VTableIndex(Index) {}
927 ContinuationIndex(ContinuationIndex) {}
965 #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)
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...
LLVM_NODISCARD LLVM_ATTRIBUTE_ALWAYS_INLINE size_t size() const
size - Get the string size.
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
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).
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)
amdgpu Simplify well known AMD library false Value Value const Twine & Name
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
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
ModifierOptions Modifiers
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.
int32_t ThisPointerAdjustment
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
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