25 #define CV_TYPE(enum, val) {#enum, enum}, 26 #include "llvm/DebugInfo/CodeView/CodeViewTypes.def" 29 #define ENUM_ENTRY(enum_class, enum) \ 30 { #enum, std::underlying_type < enum_class > ::type(enum_class::enum) } 152 #define TYPE_RECORD(ename, value, name) \ 155 #include "llvm/DebugInfo/CodeView/CodeViewTypes.def" 159 return "UnknownLeaf";
185 if (PrintRecordBytes)
203 if (PrintRecordBytes)
248 uint16_t Props =
static_cast<uint16_t
>(Class.
getOptions());
262 uint16_t Props =
static_cast<uint16_t
>(Union.
getOptions());
274 uint16_t Props =
static_cast<uint16_t
>(Enum.
getOptions());
340 printMemberAttributes(M.getAccess(), M.getMethodKind(), M.getOptions());
342 if (M.isIntroducingVirtual())
343 W->
printHex(
"VFTableOffset", M.getVFTableOffset());
389 uint16_t Mods =
static_cast<uint16_t
>(Mod.
getModifiers());
441 void TypeDumpVisitor::printMemberAttributes(
MemberAccess Access,
444 W->
printEnum(
"AccessSpecifier", uint8_t(Access),
450 W->
printFlags(
"MethodOptions",
unsigned(Options),
TypeIndex getType() const
MemberAccess getAccess() const
static const EnumEntry< uint16_t > LabelTypeEnum[]
PointerKind
Equivalent to CV_ptrtype_e.
void printItemIndex(StringRef FieldName, TypeIndex TI) const
TypeIndex getIndexType() const
uint8_t getBitSize() const
int32_t getThisPointerAdjustment() const
static const EnumEntry< uint8_t > PtrKindNames[]
void printEnum(StringRef Label, T Value, ArrayRef< EnumEntry< TEnum >> EnumValues)
MemberAccess getAccess() const
uint16_t getMemberCount() const
uint64_t getVBPtrOffset() const
uint32_t getSignature() const
TypeIndex getThisType() const
This class represents lattice values for constants.
static const EnumEntry< uint8_t > PtrModeNames[]
TypeLeafKind
Duplicate copy of the above enum, but using the official CV names.
Error visitTypeEnd(CVType &Record) override
TypeIndex getBaseType() const
StringRef getName() const
TypeIndex getType() const
bool isRValueReferenceThisPtr() const
ArrayRef< StringRef > getMethodNames() const
MemberAccess getAccess() const
MemberAccess getAccess() const
uint32_t getEntryCount() const
TypeIndex getReferentType() const
MemberPointerInfo getMemberInfo() const
void printTypeIndex(StringRef FieldName, TypeIndex TI) const
static const EnumEntry< uint8_t > FunctionOptionEnum[]
TypeIndex getType() const
auto formatv(const char *Fmt, Ts &&... Vals) -> formatv_object< decltype(std::make_tuple(detail::build_format_adapter(std::forward< Ts >(Vals))...))>
Error visitMemberRecordStream(ArrayRef< uint8_t > FieldList, TypeVisitorCallbacks &Callbacks)
virtual uint32_t size()=0
MethodKind getMethodKind() const
uint32_t getLineNumber() const
TypeIndex getFunctionType() const
bool isLValueReferenceThisPtr() const
StringRef getName() const
Error visitUnknownType(CVType &Record) override
Action to take on unknown types. By default, they are ignored.
static const EnumEntry< uint16_t > ClassOptionNames[]
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
void indent(int Levels=1)
uint16_t getParameterCount() const
static const EnumEntry< uint16_t > MemberKindNames[]
ArrayRef< uint8_t > content() const
uint64_t getBaseOffset() const
TypeIndex getContinuationIndex() const
static const EnumEntry< TypeLeafKind > LeafTypeNames[]
raw_ostream & getOStream()
uint16_t getModule() const
TypeIndex getType() const
ClassOptions getOptions() const
ModifierOptions
Equivalent to CV_modifier_t.
TypeIndex getFunctionType() const
LabelType
Equivalent to CV_LABEL_TYPE_e.
static Error visitKnownRecord(CVSymbol &Record, SymbolVisitorCallbacks &Callbacks)
TypeIndex getBaseType() const
PointerMode getMode() const
TypeIndex getElementType() const
TypeIndex getReturnType() const
CallingConvention getCallConv() const
MemberAccess getAccess() const
constexpr char Attrs[]
Key for Kernel::Metadata::mAttrs.
MethodKind
Part of member attribute flags. (CV_methodprop_e)
static TypeIndex fromArrayIndex(uint32_t Index)
#define ENUM_ENTRY(enum_class, enum)
Error visitTypeBegin(CVType &Record) override
Paired begin/end actions for all types.
TypeIndex getFieldList() const
StringRef getString() const
ArrayRef< TypeIndex > getArgs() const
PointerToMemberRepresentation getRepresentation() const
static StringRef getLeafTypeName(TypeLeafKind LT)
void printTypeIndex(ScopedPrinter &Printer, StringRef FieldName, TypeIndex TI, TypeCollection &Types)
FunctionOptions getOptions() const
uint32_t getVFPtrOffset() const
static Error visitKnownMember(CVMemberRecord &Record, TypeVisitorCallbacks &Callbacks)
size_t size() const
size - Get the array size.
raw_ostream & startLine()
LF_INDEX - Used to chain two large LF_FIELDLIST or LF_METHODLIST records together.
StringRef getUniqueName() const
AMDGPU Lower Kernel Arguments
TypeIndex getContainingType() const
TypeIndex getArgumentList() const
For method overload sets. LF_METHOD.
TypeIndex getArgumentList() const
MethodOptions getOptions() const
PointerKind getPointerKind() const
bool isPointerToMember() const
void printHex(StringRef Label, T Value)
TypeIndex getUnderlyingType() const
TypeIndex getMethodList() const
uint32_t getTypesCount() const
StringRef getName() const
TypeIndex getSourceFile() const
uint32_t getLineNumber() const
uint32_t getIndex() const
void printString(StringRef Value)
StringRef getName() const
static ErrorSuccess success()
Create a success value.
int32_t getVFTableOffset() const
void printNumber(StringRef Label, uint64_t Value)
Error visitUnknownMember(CVMemberRecord &Record) override
static const EnumEntry< uint16_t > PtrMemberRepNames[]
TypeIndex getVTableShape() const
MethodKind getMethodKind() const
Indicates if a method is defined with friend, virtual, static, etc.
MemberAccess getAccess() const
Error visitMemberBegin(CVMemberRecord &Record) override
TypeIndex getOverriddenVTable() const
TypeIndex getReturnType() const
ArrayRef< OneMethodRecord > getMethods() const
static const EnumEntry< uint8_t > CallingConventions[]
The access may modify the value stored in memory.
PointerMode
Equivalent to CV_ptrmode_e.
ArrayRef< TypeIndex > getIndices() const
uint8_t getBitOffset() const
static const EnumEntry< uint16_t > MethodOptionNames[]
TypeIndex getDerivationList() const
TypeIndex getParentScope() const
TypeIndex getCompleteClass() const
MethodOptions
Equivalent to CV_fldattr_t bitfield.
StringRef getBytesAsCharacters(ArrayRef< uint8_t > LeafData)
Reinterpret a byte array as an array of characters.
amdgpu Simplify well known AMD library false Value Value * Arg
TypeIndex getNestedType() const
void unindent(int Levels=1)
const GUID & getGuid() const
StringRef getPrecompFilePath() const
CallingConvention getCallConv() const
static const EnumEntry< uint16_t > TypeModifierNames[]
static const EnumEntry< uint8_t > MemberAccessNames[]
void printFlags(StringRef Label, T Value, ArrayRef< EnumEntry< TFlag >> Flags, TFlag EnumMask1={}, TFlag EnumMask2={}, TFlag EnumMask3={})
ArrayRef< TypeIndex > getIndices() const
StringRef getName() const
uint16_t getNumOverloads() const
uint64_t getVTableIndex() const
TypeIndex getType() const
FunctionOptions getOptions() const
PointerToMemberRepresentation
Equivalent to CV_pmtype_e.
uint16_t getParameterCount() const
MemberAccess
Source-level access specifier. (CV_access_e)
uint64_t getFieldOffset() const
MethodOptions getFlags() const
Get the flags that are not included in access control or method properties.
TypeIndex getVBPtrType() const
void printBinaryBlock(StringRef Label, ArrayRef< uint8_t > Value, uint32_t StartOffset)
Equvalent to CV_fldattr_t in cvinfo.h.
StringRef getName() const
Lightweight error class with error context and mandatory checking.
CallingConvention
These values correspond to the CV_call_e enumeration, and are documented at the following locations: ...
uint32_t getStartTypeIndex() const
Error visitMemberEnd(CVMemberRecord &Record) override
StringRef getName() const
TypeIndex getModifiedType() const
TypeIndex getSourceFile() const
StringRef - Represent a constant reference to a string, i.e.
TypeIndex getClassType() const
uint32_t getSignature() const
MemberAccess getAccess() const
Get the access specifier. Valid for any kind of member.
constexpr char Args[]
Key for Kernel::Metadata::mArgs.
TypeIndex getClassType() const
StringRef getName() const
ModifierOptions getModifiers() const
bool isIntroducingVirtual() const