26 using namespace llvm::codeview;
29 #define CV_TYPE(enum, val) {#enum, enum},
30 #include "llvm/DebugInfo/CodeView/TypeRecords.def"
33 #define ENUM_ENTRY(enum_class, enum) \
34 { #enum, std::underlying_type < enum_class > ::type(enum_class::enum) }
152 #define TYPE_RECORD(ename, value, name) \
155 #include "llvm/DebugInfo/CodeView/TypeRecords.def"
159 return "UnknownLeaf";
178 if (PrintRecordBytes)
196 if (PrintRecordBytes)
207 if (
auto EC = Visitor.visitFieldListMemberStream(FieldList.
Data))
231 uint16_t Props =
static_cast<uint16_t
>(Class.
getOptions());
245 uint16_t Props =
static_cast<uint16_t
>(Union.
getOptions());
257 uint16_t Props =
static_cast<uint16_t
>(Enum.
getOptions());
323 printMemberAttributes(M.getAccess(), M.getMethodKind(), M.getOptions());
325 if (M.isIntroducingVirtual())
326 W->
printHex(
"VFTableOffset", M.getVFTableOffset());
370 uint16_t Mods =
static_cast<uint16_t
>(Mod.
getModifiers());
411 for (
auto Arg : Args.
getArgs()) {
422 void TypeDumpVisitor::printMemberAttributes(
MemberAccess Access,
425 W->
printEnum(
"AccessSpecifier", uint8_t(Access),
431 W->
printFlags(
"MethodOptions",
unsigned(Options),
PointerKind
Equivalent to CV_ptrtype_e.
uint16_t getNumOverloads() const
CallingConvention getCallConv() const
static const EnumEntry< uint8_t > PtrKindNames[]
void printEnum(StringRef Label, T Value, ArrayRef< EnumEntry< TEnum >> EnumValues)
StringRef getName() const
TypeIndex getBaseType() const
TypeIndex getArgumentList() const
TypeIndex getSourceFile() const
MethodKind getMethodKind() const
static const EnumEntry< uint8_t > PtrModeNames[]
TypeLeafKind
Duplicate copy of the above enum, but using the official CV names.
Error visitTypeEnd(CVType &Record) override
MethodOptions getFlags() const
Get the flags that are not included in access control or method properties.
MethodOptions getOptions() const
ArrayRef< TypeIndex > getArgs() const
static const EnumEntry< uint8_t > FunctionOptionEnum[]
TypeIndex getElementType() const
TypeIndex getNextTypeIndex() const
Gets the type index for the next type record.
TypeIndex getFunctionType() const
TypeIndex getOverriddenVTable() const
CallingConvention getCallConv() const
uint32_t getLineNumber() const
uint64_t getVBPtrOffset() const
Error visitUnknownType(CVType &Record) override
Action to take on unknown types. By default, they are ignored.
MemberAccess getAccess() const
uint64_t getBaseOffset() const
static const EnumEntry< uint16_t > ClassOptionNames[]
TypeIndex getClassType() const
ArrayRef< T > makeArrayRef(const T &OneElt)
Construct an ArrayRef from a single element.
StringRef getName() const
void indent(int Levels=1)
MemberAccess getAccess() const
StringRef getString() const
bool isPointerToMember() const
StringRef getName() const
TypeIndex getReturnType() const
static const EnumEntry< uint16_t > MemberKindNames[]
bool isIntroducingVirtual() const
TypeIndex getBaseType() const
static const EnumEntry< TypeLeafKind > LeafTypeNames[]
TypeIndex getParentScope() const
raw_ostream & getOStream()
TypeIndex getContainingType() const
ModifierOptions
Equivalent to CV_modifier_t.
void printBinary(StringRef Label, StringRef Str, ArrayRef< uint8_t > Value)
uint16_t getMemberCount() const
static Error visitKnownRecord(CVSymbol &Record, SymbolVisitorCallbacks &Callbacks)
TypeIndex getThisType() const
TypeIndex getFunctionType() const
uint16_t getParameterCount() const
MemberAccess getAccess() const
MethodKind
Part of member attribute flags. (CV_methodprop_e)
StringRef getName() const
TypeIndex getReturnType() const
size_t size() const
size - Get the array size.
#define ENUM_ENTRY(enum_class, enum)
Error visitTypeBegin(CVType &Record) override
Paired begin/end actions for all types.
StringRef getName() const
uint32_t getIndex() const
TypeIndex getContinuationIndex() const
uint16_t getParameterCount() const
static StringRef getLeafTypeName(TypeLeafKind LT)
TypeIndex getVBPtrType() const
PointerToMemberRepresentation getRepresentation() const
static Error visitKnownMember(CVMemberRecord &Record, TypeVisitorCallbacks &Callbacks)
raw_ostream & startLine()
StringRef getName() const
StringRef getName() const
LF_INDEX - Used to chain two large LF_FIELDLIST or LF_METHODLIST records together.
uint32_t getLineNumber() const
TypeIndex getType() const
TypeIndex getType() const
ArrayRef< OneMethodRecord > getMethods() const
For method overload sets. LF_METHOD.
StringRef getName() const
uint8_t getBitSize() const
void printHex(StringRef Label, T Value)
FunctionOptions getOptions() const
ArrayRef< StringRef > getMethodNames() const
uint16_t getModule() const
uint32_t getEntryCount() const
MemberAccess getAccess() const
Get the access specifier. Valid for any kind of member.
ModifierOptions getModifiers() const
ClassOptions getOptions() const
void printString(StringRef Value)
static ErrorSuccess success()
Create a success value.
void printNumber(StringRef Label, uint64_t Value)
TypeIndex getCompleteClass() const
Error visitUnknownMember(CVMemberRecord &Record) override
static const EnumEntry< uint16_t > PtrMemberRepNames[]
TypeIndex getIndexType() const
ArrayRef< uint8_t > content() const
TypeIndex getClassType() const
void printTypeIndex(StringRef FieldName, TypeIndex TI) const
MemberAccess getAccess() const
PointerMode getMode() const
MethodKind getMethodKind() const
Indicates if a method is defined with friend, virtual, static, etc.
Error visitMemberBegin(CVMemberRecord &Record) override
static const EnumEntry< uint8_t > CallingConventions[]
PointerMode
Equivalent to CV_ptrmode_e.
TypeIndex getVTableShape() const
static const EnumEntry< uint16_t > MethodOptionNames[]
MethodOptions
Equivalent to CV_fldattr_t bitfield.
StringRef getBytesAsCharacters(ArrayRef< uint8_t > LeafData)
Reinterpret a byte array as an array of characters.
TypeIndex getFieldList() const
void unindent(int Levels=1)
StringRef getName() const
TypeIndex getModifiedType() const
TypeIndex getType() const
static const EnumEntry< uint16_t > TypeModifierNames[]
static const EnumEntry< uint8_t > MemberAccessNames[]
ArrayRef< TypeIndex > getIndices() const
TypeIndex getArgumentList() const
StringRef getName() const
void printFlags(StringRef Label, T Value, ArrayRef< EnumEntry< TFlag >> Flags, TFlag EnumMask1={}, TFlag EnumMask2={}, TFlag EnumMask3={})
FunctionOptions getOptions() const
uint32_t getVFPtrOffset() const
MemberPointerInfo getMemberInfo() const
static void printTypeIndex(ScopedPrinter &Printer, StringRef FieldName, TypeIndex TI, TypeDatabase &DB)
StringRef getGuid() const
TypeIndex getType() const
TypeIndex getNestedType() const
PointerToMemberRepresentation
Equivalent to CV_pmtype_e.
PointerKind getPointerKind() const
MemberAccess
Source-level access specifier. (CV_access_e)
TypeIndex getMethodList() const
uint64_t getFieldOffset() const
MemberAccess getAccess() const
uint8_t getBitOffset() const
Equvalent to CV_fldattr_t in cvinfo.h.
TypeIndex getSourceFile() 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: ...
Error visitMemberEnd(CVMemberRecord &Record) override
PointerOptions getOptions() const
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
TypeIndex getDerivationList() const
uint64_t getVTableIndex() const
TypeIndex getReferentType() const
StringRef getName() const
void printBinaryBlock(StringRef Label, ArrayRef< uint8_t > Value)
StringRef getName() const