diff --git a/llvm/lib/DebugInfo/CodeView/TypeDumper.cpp b/llvm/lib/DebugInfo/CodeView/TypeDumper.cpp index 9fcc4a24cbe7..8139484a6a03 100644 --- a/llvm/lib/DebugInfo/CodeView/TypeDumper.cpp +++ b/llvm/lib/DebugInfo/CodeView/TypeDumper.cpp @@ -362,7 +362,7 @@ void CVTypeDumperImpl::visitUnionType(TypeLeafKind Leaf, const UnionType *Union, } void CVTypeDumperImpl::visitEnumType(TypeLeafKind Leaf, const EnumType *Enum, - ArrayRef LeafData) { + ArrayRef LeafData) { W.printNumber("NumEnumerators", Enum->NumEnumerators); W.printFlags("Properties", uint16_t(Enum->Properties), makeArrayRef(ClassOptionNames)); @@ -373,7 +373,7 @@ void CVTypeDumperImpl::visitEnumType(TypeLeafKind Leaf, const EnumType *Enum, } void CVTypeDumperImpl::visitArrayType(TypeLeafKind Leaf, const ArrayType *AT, - ArrayRef LeafData) { + ArrayRef LeafData) { printTypeIndex("ElementType", AT->ElementType); printTypeIndex("IndexType", AT->IndexType); uint64_t SizeOf; @@ -384,8 +384,9 @@ void CVTypeDumperImpl::visitArrayType(TypeLeafKind Leaf, const ArrayType *AT, W.printString("Name", Name); } -void CVTypeDumperImpl::visitVFTableType(TypeLeafKind Leaf, const VFTableType *VFT, - ArrayRef LeafData) { +void CVTypeDumperImpl::visitVFTableType(TypeLeafKind Leaf, + const VFTableType *VFT, + ArrayRef LeafData) { printTypeIndex("CompleteClass", VFT->CompleteClass); printTypeIndex("OverriddenVFTable", VFT->OverriddenVFTable); W.printHex("VFPtrOffset", VFT->VFPtrOffset); @@ -399,8 +400,9 @@ void CVTypeDumperImpl::visitVFTableType(TypeLeafKind Leaf, const VFTableType *VF } } -void CVTypeDumperImpl::visitMemberFuncId(TypeLeafKind Leaf, const MemberFuncId *Id, - ArrayRef LeafData) { +void CVTypeDumperImpl::visitMemberFuncId(TypeLeafKind Leaf, + const MemberFuncId *Id, + ArrayRef LeafData) { printTypeIndex("ClassType", Id->ClassType); printTypeIndex("FunctionType", Id->FunctionType); Name = getBytesAsCString(LeafData); @@ -408,8 +410,8 @@ void CVTypeDumperImpl::visitMemberFuncId(TypeLeafKind Leaf, const MemberFuncId * } void CVTypeDumperImpl::visitProcedureType(TypeLeafKind Leaf, - const ProcedureType *Proc, - ArrayRef LeafData) { + const ProcedureType *Proc, + ArrayRef LeafData) { printTypeIndex("ReturnType", Proc->ReturnType); W.printEnum("CallingConvention", uint8_t(Proc->CallConv), makeArrayRef(CallingConventions)); @@ -426,9 +428,9 @@ void CVTypeDumperImpl::visitProcedureType(TypeLeafKind Leaf, Name = CVTD.saveName(TypeName); } -void CVTypeDumperImpl::visitMemberFunctionType(TypeLeafKind Leaf, - const MemberFunctionType *MemberFunc, - ArrayRef LeafData) { +void CVTypeDumperImpl::visitMemberFunctionType( + TypeLeafKind Leaf, const MemberFunctionType *MemberFunc, + ArrayRef LeafData) { printTypeIndex("ReturnType", MemberFunc->ReturnType); printTypeIndex("ClassType", MemberFunc->ClassType); printTypeIndex("ThisType", MemberFunc->ThisType); @@ -452,7 +454,7 @@ void CVTypeDumperImpl::visitMemberFunctionType(TypeLeafKind Leaf, } void CVTypeDumperImpl::visitMethodList(TypeLeafKind Leaf, - ArrayRef LeafData) { + ArrayRef LeafData) { while (!LeafData.empty()) { const MethodListEntry *Method; if (!consumeObject(LeafData, Method)) @@ -470,7 +472,7 @@ void CVTypeDumperImpl::visitMethodList(TypeLeafKind Leaf, } void CVTypeDumperImpl::visitFuncId(TypeLeafKind Leaf, const FuncId *Func, - ArrayRef LeafData) { + ArrayRef LeafData) { printTypeIndex("ParentScope", Func->ParentScope); printTypeIndex("FunctionType", Func->FunctionType); Name = getBytesAsCString(LeafData); @@ -478,16 +480,17 @@ void CVTypeDumperImpl::visitFuncId(TypeLeafKind Leaf, const FuncId *Func, } void CVTypeDumperImpl::visitTypeServer2(TypeLeafKind Leaf, - const TypeServer2 *TypeServer, - ArrayRef LeafData) { + const TypeServer2 *TypeServer, + ArrayRef LeafData) { W.printBinary("Signature", StringRef(TypeServer->Signature, 16)); W.printNumber("Age", TypeServer->Age); Name = getBytesAsCString(LeafData); W.printString("Name", Name); } -void CVTypeDumperImpl::visitPointerType(TypeLeafKind Leaf, const PointerType *Ptr, - ArrayRef LeafData) { +void CVTypeDumperImpl::visitPointerType(TypeLeafKind Leaf, + const PointerType *Ptr, + ArrayRef LeafData) { printTypeIndex("PointeeType", Ptr->PointeeType); W.printHex("PointerAttributes", Ptr->Attrs); W.printEnum("PtrType", unsigned(Ptr->getPtrKind()), @@ -538,8 +541,9 @@ void CVTypeDumperImpl::visitPointerType(TypeLeafKind Leaf, const PointerType *Pt } } -void CVTypeDumperImpl::visitTypeModifier(TypeLeafKind Leaf, const TypeModifier *Mod, - ArrayRef LeafData) { +void CVTypeDumperImpl::visitTypeModifier(TypeLeafKind Leaf, + const TypeModifier *Mod, + ArrayRef LeafData) { printTypeIndex("ModifiedType", Mod->ModifiedType); W.printFlags("Modifiers", Mod->Modifiers, makeArrayRef(TypeModifierNames)); @@ -555,23 +559,25 @@ void CVTypeDumperImpl::visitTypeModifier(TypeLeafKind Leaf, const TypeModifier * Name = CVTD.saveName(TypeName); } -void CVTypeDumperImpl::visitVTableShape(TypeLeafKind Leaf, const VTableShape *Shape, - ArrayRef LeafData) { +void CVTypeDumperImpl::visitVTableShape(TypeLeafKind Leaf, + const VTableShape *Shape, + ArrayRef LeafData) { unsigned VFEntryCount = Shape->VFEntryCount; W.printNumber("VFEntryCount", VFEntryCount); // We could print out whether the methods are near or far, but in practice // today everything is CV_VTS_near32, so it's just noise. } -void CVTypeDumperImpl::visitUDTSrcLine(TypeLeafKind Leaf, const UDTSrcLine *Line, - ArrayRef LeafData) { +void CVTypeDumperImpl::visitUDTSrcLine(TypeLeafKind Leaf, + const UDTSrcLine *Line, + ArrayRef LeafData) { printTypeIndex("UDT", Line->UDT); printTypeIndex("SourceFile", Line->SourceFile); W.printNumber("LineNumber", Line->LineNumber); } void CVTypeDumperImpl::visitBuildInfo(TypeLeafKind Leaf, const BuildInfo *Args, - ArrayRef LeafData) { + ArrayRef LeafData) { W.printNumber("NumArgs", Args->NumArgs); ListScope Arguments(W, "Arguments"); @@ -600,8 +606,9 @@ void CVTypeDumperImpl::visitUnknownMember(TypeLeafKind Leaf) { W.printHex("UnknownMember", unsigned(Leaf)); } -void CVTypeDumperImpl::visitNestedType(TypeLeafKind Leaf, const NestedType *Nested, - ArrayRef &FieldData) { +void CVTypeDumperImpl::visitNestedType(TypeLeafKind Leaf, + const NestedType *Nested, + ArrayRef &FieldData) { DictScope S(W, "NestedType"); printTypeIndex("Type", Nested->Type); StringRef Name = getBytesAsCString(FieldData); @@ -609,8 +616,9 @@ void CVTypeDumperImpl::visitNestedType(TypeLeafKind Leaf, const NestedType *Nest W.printString("Name", Name); } -void CVTypeDumperImpl::visitOneMethod(TypeLeafKind Leaf, const OneMethod *Method, - ArrayRef &FieldData) { +void CVTypeDumperImpl::visitOneMethod(TypeLeafKind Leaf, + const OneMethod *Method, + ArrayRef &FieldData) { DictScope S(W, "OneMethod"); printMemberAttributes(Method->Attrs); printTypeIndex("Type", Method->Type); @@ -627,8 +635,8 @@ void CVTypeDumperImpl::visitOneMethod(TypeLeafKind Leaf, const OneMethod *Method } void CVTypeDumperImpl::visitOverloadedMethod(TypeLeafKind Leaf, - const OverloadedMethod *Method, - ArrayRef &FieldData) { + const OverloadedMethod *Method, + ArrayRef &FieldData) { DictScope S(W, "OverloadedMethod"); W.printHex("MethodCount", Method->MethodCount); W.printHex("MethodListIndex", Method->MethList.getIndex()); @@ -637,8 +645,9 @@ void CVTypeDumperImpl::visitOverloadedMethod(TypeLeafKind Leaf, W.printString("Name", Name); } -void CVTypeDumperImpl::visitDataMember(TypeLeafKind Leaf, const DataMember *Field, - ArrayRef &FieldData) { +void CVTypeDumperImpl::visitDataMember(TypeLeafKind Leaf, + const DataMember *Field, + ArrayRef &FieldData) { DictScope S(W, "DataMember"); printMemberAttributes(Field->Attrs); printTypeIndex("Type", Field->Type); @@ -652,8 +661,8 @@ void CVTypeDumperImpl::visitDataMember(TypeLeafKind Leaf, const DataMember *Fiel } void CVTypeDumperImpl::visitStaticDataMember(TypeLeafKind Leaf, - const StaticDataMember *Field, - ArrayRef &FieldData) { + const StaticDataMember *Field, + ArrayRef &FieldData) { DictScope S(W, "StaticDataMember"); printMemberAttributes(Field->Attrs); printTypeIndex("Type", Field->Type); @@ -669,8 +678,9 @@ void CVTypeDumperImpl::visitVirtualFunctionPointer( printTypeIndex("Type", VFTable->Type); } -void CVTypeDumperImpl::visitEnumerator(TypeLeafKind Leaf, const Enumerator *Enum, - ArrayRef &FieldData) { +void CVTypeDumperImpl::visitEnumerator(TypeLeafKind Leaf, + const Enumerator *Enum, + ArrayRef &FieldData) { DictScope S(W, "Enumerator"); printMemberAttributes(Enum->Attrs); APSInt EnumValue; @@ -683,7 +693,7 @@ void CVTypeDumperImpl::visitEnumerator(TypeLeafKind Leaf, const Enumerator *Enum } void CVTypeDumperImpl::visitBaseClass(TypeLeafKind Leaf, const BaseClass *Base, - ArrayRef &FieldData) { + ArrayRef &FieldData) { DictScope S(W, "BaseClass"); printMemberAttributes(Base->Attrs); printTypeIndex("BaseType", Base->BaseType); @@ -694,8 +704,8 @@ void CVTypeDumperImpl::visitBaseClass(TypeLeafKind Leaf, const BaseClass *Base, } void CVTypeDumperImpl::visitVirtualBaseClass(TypeLeafKind Leaf, - const VirtualBaseClass *Base, - ArrayRef &FieldData) { + const VirtualBaseClass *Base, + ArrayRef &FieldData) { DictScope S(W, "VirtualBaseClass"); printMemberAttributes(Base->Attrs); printTypeIndex("BaseType", Base->BaseType);