/// CVTypeVisitor overrides.
#define TYPE_RECORD(EnumName, EnumVal, Name) \
- void visit##Name(TypeLeafKind LeafType, Name##Record &Record);
+ void visit##Name(Name##Record &Record);
#define TYPE_RECORD_ALIAS(EnumName, EnumVal, Name, AliasName)
#define MEMBER_RECORD(EnumName, EnumVal, Name) \
- void visit##Name(TypeLeafKind LeafType, Name##Record &Record);
+ void visit##Name(Name##Record &Record);
#define MEMBER_RECORD_ALIAS(EnumName, EnumVal, Name, AliasName)
#include "llvm/DebugInfo/CodeView/TypeRecords.def"
W.startLine() << "}\n";
}
-void CVTypeDumperImpl::visitStringId(TypeLeafKind Leaf,
- StringIdRecord &String) {
+void CVTypeDumperImpl::visitStringId(StringIdRecord &String) {
printTypeIndex("Id", String.getId());
W.printString("StringData", String.getString());
// Put this in CVUDTNames so it gets printed with LF_UDT_SRC_LINE.
Name = String.getString();
}
-void CVTypeDumperImpl::visitArgList(TypeLeafKind Leaf, ArgListRecord &Args) {
+void CVTypeDumperImpl::visitArgList(ArgListRecord &Args) {
auto Indices = Args.getIndices();
uint32_t Size = Indices.size();
W.printNumber("NumArgs", Size);
Name = CVTD.saveName(TypeName);
}
-void CVTypeDumperImpl::visitClass(TypeLeafKind Leaf, ClassRecord &Class) {
+void CVTypeDumperImpl::visitClass(ClassRecord &Class) {
uint16_t Props = static_cast<uint16_t>(Class.getOptions());
W.printNumber("MemberCount", Class.getMemberCount());
W.printFlags("Properties", Props, makeArrayRef(ClassOptionNames));
Name = Class.getName();
}
-void CVTypeDumperImpl::visitUnion(TypeLeafKind Leaf, UnionRecord &Union) {
+void CVTypeDumperImpl::visitUnion(UnionRecord &Union) {
uint16_t Props = static_cast<uint16_t>(Union.getOptions());
W.printNumber("MemberCount", Union.getMemberCount());
W.printFlags("Properties", Props, makeArrayRef(ClassOptionNames));
Name = Union.getName();
}
-void CVTypeDumperImpl::visitEnum(TypeLeafKind Leaf, EnumRecord &Enum) {
+void CVTypeDumperImpl::visitEnum(EnumRecord &Enum) {
W.printNumber("NumEnumerators", Enum.getMemberCount());
W.printFlags("Properties", uint16_t(Enum.getOptions()),
makeArrayRef(ClassOptionNames));
Name = Enum.getName();
}
-void CVTypeDumperImpl::visitArray(TypeLeafKind Leaf, ArrayRecord &AT) {
+void CVTypeDumperImpl::visitArray(ArrayRecord &AT) {
printTypeIndex("ElementType", AT.getElementType());
printTypeIndex("IndexType", AT.getIndexType());
W.printNumber("SizeOf", AT.getSize());
Name = AT.getName();
}
-void CVTypeDumperImpl::visitVFTable(TypeLeafKind Leaf, VFTableRecord &VFT) {
+void CVTypeDumperImpl::visitVFTable(VFTableRecord &VFT) {
printTypeIndex("CompleteClass", VFT.getCompleteClass());
printTypeIndex("OverriddenVFTable", VFT.getOverriddenVTable());
W.printHex("VFPtrOffset", VFT.getVFPtrOffset());
Name = VFT.getName();
}
-void CVTypeDumperImpl::visitMemberFuncId(TypeLeafKind Leaf,
- MemberFuncIdRecord &Id) {
+void CVTypeDumperImpl::visitMemberFuncId(MemberFuncIdRecord &Id) {
printTypeIndex("ClassType", Id.getClassType());
printTypeIndex("FunctionType", Id.getFunctionType());
W.printString("Name", Id.getName());
Name = Id.getName();
}
-void CVTypeDumperImpl::visitProcedure(TypeLeafKind Leaf,
- ProcedureRecord &Proc) {
+void CVTypeDumperImpl::visitProcedure(ProcedureRecord &Proc) {
printTypeIndex("ReturnType", Proc.getReturnType());
W.printEnum("CallingConvention", uint8_t(Proc.getCallConv()),
makeArrayRef(CallingConventions));
Name = CVTD.saveName(TypeName);
}
-void CVTypeDumperImpl::visitMemberFunction(TypeLeafKind Leaf,
- MemberFunctionRecord &MF) {
+void CVTypeDumperImpl::visitMemberFunction(MemberFunctionRecord &MF) {
printTypeIndex("ReturnType", MF.getReturnType());
printTypeIndex("ClassType", MF.getClassType());
printTypeIndex("ThisType", MF.getThisType());
}
void CVTypeDumperImpl::visitMethodOverloadList(
- TypeLeafKind Leaf, MethodOverloadListRecord &MethodList) {
+ MethodOverloadListRecord &MethodList) {
for (auto &M : MethodList.getMethods()) {
ListScope S(W, "Method");
printMemberAttributes(M.getAccess(), M.getKind(), M.getOptions());
}
}
-void CVTypeDumperImpl::visitFuncId(TypeLeafKind Leaf, FuncIdRecord &Func) {
+void CVTypeDumperImpl::visitFuncId(FuncIdRecord &Func) {
printTypeIndex("ParentScope", Func.getParentScope());
printTypeIndex("FunctionType", Func.getFunctionType());
W.printString("Name", Func.getName());
Name = Func.getName();
}
-void CVTypeDumperImpl::visitTypeServer2(TypeLeafKind Leaf,
- TypeServer2Record &TS) {
+void CVTypeDumperImpl::visitTypeServer2(TypeServer2Record &TS) {
W.printBinary("Signature", TS.getGuid());
W.printNumber("Age", TS.getAge());
W.printString("Name", TS.getName());
Name = TS.getName();
}
-void CVTypeDumperImpl::visitPointer(TypeLeafKind Leaf, PointerRecord &Ptr) {
+void CVTypeDumperImpl::visitPointer(PointerRecord &Ptr) {
printTypeIndex("PointeeType", Ptr.getReferentType());
W.printHex("PointerAttributes", uint32_t(Ptr.getOptions()));
W.printEnum("PtrType", unsigned(Ptr.getPointerKind()),
}
}
-void CVTypeDumperImpl::visitModifier(TypeLeafKind Leaf, ModifierRecord &Mod) {
+void CVTypeDumperImpl::visitModifier(ModifierRecord &Mod) {
uint16_t Mods = static_cast<uint16_t>(Mod.getModifiers());
printTypeIndex("ModifiedType", Mod.getModifiedType());
W.printFlags("Modifiers", Mods, makeArrayRef(TypeModifierNames));
Name = CVTD.saveName(TypeName);
}
-void CVTypeDumperImpl::visitBitField(TypeLeafKind Leaf,
- BitFieldRecord &BitField) {
+void CVTypeDumperImpl::visitBitField(BitFieldRecord &BitField) {
printTypeIndex("Type", BitField.getType());
W.printNumber("BitSize", BitField.getBitSize());
W.printNumber("BitOffset", BitField.getBitOffset());
}
-void CVTypeDumperImpl::visitVFTableShape(TypeLeafKind Leaf,
- VFTableShapeRecord &Shape) {
+void CVTypeDumperImpl::visitVFTableShape(VFTableShapeRecord &Shape) {
W.printNumber("VFEntryCount", Shape.getEntryCount());
}
-void CVTypeDumperImpl::visitUdtSourceLine(TypeLeafKind Leaf,
- UdtSourceLineRecord &Line) {
+void CVTypeDumperImpl::visitUdtSourceLine(UdtSourceLineRecord &Line) {
printTypeIndex("UDT", Line.getUDT());
printTypeIndex("SourceFile", Line.getSourceFile());
W.printNumber("LineNumber", Line.getLineNumber());
}
-void CVTypeDumperImpl::visitUdtModSourceLine(TypeLeafKind Leaf,
- UdtModSourceLineRecord &Line) {
+void CVTypeDumperImpl::visitUdtModSourceLine(UdtModSourceLineRecord &Line) {
printTypeIndex("UDT", Line.getUDT());
printTypeIndex("SourceFile", Line.getSourceFile());
W.printNumber("LineNumber", Line.getLineNumber());
W.printNumber("Module", Line.getModule());
}
-void CVTypeDumperImpl::visitBuildInfo(TypeLeafKind Leaf,
- BuildInfoRecord &Args) {
+void CVTypeDumperImpl::visitBuildInfo(BuildInfoRecord &Args) {
W.printNumber("NumArgs", static_cast<uint32_t>(Args.getArgs().size()));
ListScope Arguments(W, "Arguments");
W.printNumber("Length", uint32_t(RecordData.size()));
}
-void CVTypeDumperImpl::visitNestedType(TypeLeafKind Leaf,
- NestedTypeRecord &Nested) {
+void CVTypeDumperImpl::visitNestedType(NestedTypeRecord &Nested) {
DictScope S(W, "NestedType");
printTypeIndex("Type", Nested.getNestedType());
W.printString("Name", Nested.getName());
Name = Nested.getName();
}
-void CVTypeDumperImpl::visitOneMethod(TypeLeafKind Leaf,
- OneMethodRecord &Method) {
+void CVTypeDumperImpl::visitOneMethod(OneMethodRecord &Method) {
DictScope S(W, "OneMethod");
MethodKind K = Method.getKind();
printMemberAttributes(Method.getAccess(), K, Method.getOptions());
Name = Method.getName();
}
-void CVTypeDumperImpl::visitOverloadedMethod(TypeLeafKind Leaf,
- OverloadedMethodRecord &Method) {
+void CVTypeDumperImpl::visitOverloadedMethod(OverloadedMethodRecord &Method) {
DictScope S(W, "OverloadedMethod");
W.printHex("MethodCount", Method.getNumOverloads());
printTypeIndex("MethodListIndex", Method.getMethodList());
Name = Method.getName();
}
-void CVTypeDumperImpl::visitDataMember(TypeLeafKind Leaf,
- DataMemberRecord &Field) {
+void CVTypeDumperImpl::visitDataMember(DataMemberRecord &Field) {
DictScope S(W, "DataMember");
printMemberAttributes(Field.getAccess(), MethodKind::Vanilla,
MethodOptions::None);
Name = Field.getName();
}
-void CVTypeDumperImpl::visitStaticDataMember(TypeLeafKind Leaf,
- StaticDataMemberRecord &Field) {
+void CVTypeDumperImpl::visitStaticDataMember(StaticDataMemberRecord &Field) {
DictScope S(W, "StaticDataMember");
printMemberAttributes(Field.getAccess(), MethodKind::Vanilla,
MethodOptions::None);
Name = Field.getName();
}
-void CVTypeDumperImpl::visitVFPtr(TypeLeafKind Leaf, VFPtrRecord &VFTable) {
+void CVTypeDumperImpl::visitVFPtr(VFPtrRecord &VFTable) {
DictScope S(W, "VFPtr");
printTypeIndex("Type", VFTable.getType());
}
-void CVTypeDumperImpl::visitEnumerator(TypeLeafKind Leaf,
- EnumeratorRecord &Enum) {
+void CVTypeDumperImpl::visitEnumerator(EnumeratorRecord &Enum) {
DictScope S(W, "Enumerator");
printMemberAttributes(Enum.getAccess(), MethodKind::Vanilla,
MethodOptions::None);
Name = Enum.getName();
}
-void CVTypeDumperImpl::visitBaseClass(TypeLeafKind Leaf,
- BaseClassRecord &Base) {
+void CVTypeDumperImpl::visitBaseClass(BaseClassRecord &Base) {
DictScope S(W, "BaseClass");
printMemberAttributes(Base.getAccess(), MethodKind::Vanilla,
MethodOptions::None);
W.printHex("BaseOffset", Base.getBaseOffset());
}
-void CVTypeDumperImpl::visitVirtualBaseClass(TypeLeafKind Leaf,
- VirtualBaseClassRecord &Base) {
+void CVTypeDumperImpl::visitVirtualBaseClass(VirtualBaseClassRecord &Base) {
DictScope S(W, "VirtualBaseClass");
printMemberAttributes(Base.getAccess(), MethodKind::Vanilla,
MethodOptions::None);