diff options
-rw-r--r-- | llvm/test/DebugInfo/PDB/Inputs/every-type.cpp | 63 | ||||
-rw-r--r-- | llvm/test/DebugInfo/PDB/Inputs/every-type.pdb | bin | 0 -> 102400 bytes | |||
-rw-r--r-- | llvm/test/DebugInfo/PDB/Inputs/every-type.yaml | 272 | ||||
-rw-r--r-- | llvm/test/DebugInfo/PDB/every-type.test | 261 | ||||
-rw-r--r-- | llvm/test/DebugInfo/PDB/pdbdump-headers.test | 66 | ||||
-rw-r--r-- | llvm/test/DebugInfo/PDB/pdbdump-merge-ids-and-types.test | 3 | ||||
-rw-r--r-- | llvm/test/DebugInfo/PDB/pdbdump-mergetypes.test | 6 | ||||
-rw-r--r-- | llvm/test/tools/llvm-pdbdump/partial-type-stream.test | 3 | ||||
-rw-r--r-- | llvm/tools/llvm-pdbutil/MinimalTypeDumper.cpp | 6 | ||||
-rw-r--r-- | llvm/tools/llvm-pdbutil/llvm-pdbutil.cpp | 4 |
10 files changed, 627 insertions, 57 deletions
diff --git a/llvm/test/DebugInfo/PDB/Inputs/every-type.cpp b/llvm/test/DebugInfo/PDB/Inputs/every-type.cpp new file mode 100644 index 00000000000..ed715b03430 --- /dev/null +++ b/llvm/test/DebugInfo/PDB/Inputs/every-type.cpp @@ -0,0 +1,63 @@ +// Build with "cl.exe /Zi /GR- /GX- every-type.cpp /link /debug /nodefaultlib /entry:main" + +// clang-format off +void *__purecall = 0; + +void __cdecl operator delete(void *,unsigned int) {} + +struct FooStruct { }; // LF_STRUCTURE + +class FooClass { // LF_CLASS + // LF_FIELDLIST + enum NestedEnum { // LF_ENUM + // LF_NESTTYPE + A, B, C // LF_ENUMERATE + }; + + void RegularMethod() {} // LF_ARGLIST + // LF_ONEMETHOD + // LF_MFUNCTION + + void OverloadedMethod(int) {} // LF_METHODLIST + // LF_METHOD + void OverloadedMethod(int, int) {} + + int HiNibble : 4; // LF_BITFIELD + int LoNibble : 4; + NestedEnum EnumVariable; // LF_MEMBER + static void *StaticMember; // LF_POINTER + // LF_STMEMBER +}; + +void *FooClass::StaticMember = nullptr; + +class Inherit : public FooClass { // LF_BCLASS +public: + virtual ~Inherit() {} // LF_VTSHAPE + // LF_VFUNCTAB +}; + +class VInherit : public virtual FooClass { // LF_VBCLASS + +}; + +class IVInherit : public VInherit { // LF_IVBCLASS +}; + +union TheUnion { + int X; // LF_UNION +}; + +int SomeArray[7] = {1, 2, 3, 4, 5, 6, 7}; // LF_ARRAY + +int main(int argc, char **argv) { // LF_PROCEDURE + const int X = 7; // LF_MODIFIER + + FooStruct FooStructInstance; + FooClass FooClassInstance; + Inherit InheritInstance; + VInherit VInheritInstance; + IVInherit IVInheritInstance; + TheUnion UnionInstance; + return SomeArray[argc]; +} diff --git a/llvm/test/DebugInfo/PDB/Inputs/every-type.pdb b/llvm/test/DebugInfo/PDB/Inputs/every-type.pdb Binary files differnew file mode 100644 index 00000000000..64996d61d3e --- /dev/null +++ b/llvm/test/DebugInfo/PDB/Inputs/every-type.pdb diff --git a/llvm/test/DebugInfo/PDB/Inputs/every-type.yaml b/llvm/test/DebugInfo/PDB/Inputs/every-type.yaml new file mode 100644 index 00000000000..8f23e8ad5e8 --- /dev/null +++ b/llvm/test/DebugInfo/PDB/Inputs/every-type.yaml @@ -0,0 +1,272 @@ +--- +TpiStream: + Records: + # int* [Index: 0x1000] + - Kind: LF_POINTER + Pointer: + ReferentType: 116 # int + Attrs: 32778 + # const int* [Index: 0x1001] + - Kind: LF_MODIFIER + Modifier: + ModifiedType: 0x1000 + Modifiers: [ Const ] + # char* [Index: 0x1002] + - Kind: LF_POINTER + Pointer: + ReferentType: 1136 # char* + Attrs: 32778 + # (int, char **) [Index: 0x1003] + - Kind: LF_ARGLIST + ArgList: + ArgIndicies: [ 116, 0x1002 ] + # (int, double) [Index: 0x1004] + - Kind: LF_ARGLIST + ArgList: + ArgIndicies: [ 116, 65 ] # (int, double) + # int main(int argc, char **argv) [Index: 0x1005] + - Kind: LF_PROCEDURE + Procedure: + ReturnType: 117 # int + CallConv: NearC # __cdecl + Options: [ None ] + ParameterCount: 2 + ArgumentList: 0x1003 # (int, char**) + # <label> [Index: 0x1006] + - Kind: LF_LABEL + Label: + Mode: Near + # <forward decl> + # class FooClass; [Index: 0x1007] + - Kind: LF_STRUCTURE + Class: + MemberCount: 0 + Options: [ None, ForwardReference ] + FieldList: 0 + Name: 'FooClass' + DerivationList: 0 + VTableShape: 0 + Size: 0 + # char* [Index: 0x1008] + - Kind: LF_POINTER + Pointer: + ReferentType: 0x1007 # FooClass + Attrs: 33802 # const + # int (FooClass::)(int, char **) [Index: 0x1009] + - Kind: LF_MFUNCTION + MemberFunction: + ReturnType: 116 # int + ClassType: 0x1007 # FooClass + ThisType: 0x1008 # const FooClass* + CallConv: ThisCall + Options: [ None ] + ParameterCount: 2 + ArgumentList: 0x1003 # (int, char**) + ThisPointerAdjustment: 0 + # int (FooClass::)(int, double) [Index: 0x100A] + - Kind: LF_MFUNCTION + MemberFunction: + ReturnType: 116 # int + ClassType: 0x1007 # FooClass + ThisType: 0x1008 # const FooClass* + CallConv: ThisCall + Options: [ None ] + ParameterCount: 2 + ArgumentList: 0x1004 # (int, double) + ThisPointerAdjustment: 0 + # <method overload list> + # int (FooClass::)(int, char **) + # int (FooClass::)(int, double) [Index: 0x100B] + - Kind: LF_METHODLIST + MethodOverloadList: + Methods: + - Type: 0x1009 # int (FooClass::)(int, char **) + Attrs: 3 # public + VFTableOffset: -1 + Name: '' + - Type: 0x100A # int (FooClass::)(int, double) + Attrs: 3 # public + VFTableOffset: -1 + Name: '' + # <Field List> + # A, B, C [Index: 0x100C] + - Kind: LF_FIELDLIST + FieldList: + - Kind: LF_ENUMERATE + Enumerator: + Attrs: 3 + Value: 0 + Name: A + - Kind: LF_ENUMERATE + Enumerator: + Attrs: 3 + Value: 1 + Name: B + - Kind: LF_ENUMERATE + Enumerator: + Attrs: 3 + Value: 2 + Name: C + # enum FooClass::Enum : uint32_t { + # A, B, C + # }; [Index: 0x100D] + - Kind: LF_ENUM + Enum: + NumEnumerators: 3 + Options: [ None, Nested ] + FieldList: 0x100C + Name: 'FooClass::Enum' + UnderlyingType: 117 + # <Field List> + # public: + # enum FooEnum : uint32_t { + # A, B, C + # }; + # FooEnum EnumMember; + # static int StaticInt; + # int FooClass::OverloadedMethod(int, char **); + # int FooClass::OverloadedMethod(int, double); + # int FooClass::RegularMethod(int, double); + # [Index: 0x100E] + - Kind: LF_FIELDLIST + FieldList: + # enum FooEnum : uint32_t { + # A, B, C + # }; + - Kind: LF_NESTTYPE + NestedType: + Type: 0x100D + Name: FooEnum + # FooEnum EnumMember; + - Kind: LF_MEMBER + DataMember: + Attrs: 3 # public + Type: 0x100D # void* + FieldOffset: 0 + Name: EnumMember + # static int StaticInt; + - Kind: LF_STMEMBER + StaticDataMember: + Attrs: 3 # public + Type: 116 # int + Name: StaticInt + # int FooClass::OverloadedMethod(int, char **); + # int FooClass::OverloadedMethod(int, double); + - Kind: LF_METHOD + OverloadedMethod: + NumOverloads: 2 + MethodList: 0x100B + Name: OverloadedMethod + # int FooClass::RegularMethod(int, double); + - Kind: LF_ONEMETHOD + OneMethod: + Type: 0x100A + Attrs: 3 # public + VFTableOffset: -1 + Name: RegularMethod + # class FooClass { + # public: + # enum FooEnum : uint32_t { + # A, B, C + # }; + # FooEnum EnumMember; + # static int StaticInt; + # int FooClass::OverloadedMethod(int, char **); + # int FooClass::OverloadedMethod(int, double); + # int FooClass::RegularMethod(int, double); + # }; [Index: 0x100F] + - Kind: LF_CLASS + Class: + MemberCount: 6 + Options: [ None ] + FieldList: 0x100E + Name: 'FooClass' + DerivationList: 0 + VTableShape: 0 + Size: 4 + # struct FooStructure; [Index: 0x1010] + - Kind: LF_STRUCTURE + Class: + MemberCount: 6 + Options: [ None ] + FieldList: 0x100E + Name: 'FooStructure' + DerivationList: 0 + VTableShape: 0 + Size: 4 + # interface FooInterface; [Index: 0x1011] + - Kind: LF_INTERFACE + Class: + MemberCount: 6 + Options: [ None ] + FieldList: 0x100E + Name: 'FooInterface' + DerivationList: 0 + VTableShape: 0 + Size: 4 + # <field list> + # : public FooClass [Index: 0x1012] + - Kind: LF_FIELDLIST + FieldList: + - Kind: LF_BCLASS + Attrs: 3 # public + Type: 0x100F # FooClass + Offset: 0 + # <field list> + # : public virtual FooClass [Index: 0x1013] + - Kind: LF_FIELDLIST + FieldList: + - Kind: LF_VBCLASS + Attrs: 3 # public + BaseType: 0x100F # FooClass + VBPtrType: 0x1001 # const int * + VBPtrOffset: 0 + VTableIndex: 1 + # class Inherit : public FooClass {}; [Index: 0x1014] + - Kind: LF_STRUCTURE + Class: + MemberCount: 1 + Options: [ None ] + FieldList: 0x100E + Name: 'Inherit' + DerivationList: 0x1012 + VTableShape: 0 + Size: 4 + # class VInherit : public virtual FooClass {}; [Index: 0x1015] + - Kind: LF_STRUCTURE + Class: + MemberCount: 1 + Options: [ None ] + FieldList: 0x100E + Name: 'Inherit' + DerivationList: 0x1012 + VTableShape: 0 + Size: 4 + +# // Member type records. These are generally not length prefixed, and appear +# // inside of a field list record. +# MEMBER_RECORD(LF_VFUNCTAB, 0x1409, VFPtr) + +# MEMBER_RECORD_ALIAS(LF_BINTERFACE, 0x151a, BaseInterface, BaseClass) + +# MEMBER_RECORD_ALIAS(LF_IVBCLASS, 0x1402, IndirectVirtualBaseClass, +# VirtualBaseClass) + + +# TYPE_RECORD(LF_ARRAY, 0x1503, Array) +# TYPE_RECORD(LF_UNION, 0x1506, Union) +# TYPE_RECORD(LF_TYPESERVER2, 0x1515, TypeServer2) +# TYPE_RECORD(LF_VFTABLE, 0x151d, VFTable) +# TYPE_RECORD(LF_VTSHAPE, 0x000a, VFTableShape) + +# TYPE_RECORD(LF_BITFIELD, 0x1205, BitField) + + +# // ID leaf records. Subsequent leaf types may be referenced from .debug$S. +# TYPE_RECORD(LF_FUNC_ID, 0x1601, FuncId) +# TYPE_RECORD(LF_MFUNC_ID, 0x1602, MemberFuncId) +# TYPE_RECORD(LF_BUILDINFO, 0x1603, BuildInfo) +# TYPE_RECORD(LF_SUBSTR_LIST, 0x1604, StringList) +# TYPE_RECORD(LF_STRING_ID, 0x1605, StringId) +# TYPE_RECORD(LF_UDT_SRC_LINE, 0x1606, UdtSourceLine) +# TYPE_RECORD(LF_UDT_MOD_SRC_LINE, 0x1607, UdtModSourceLine) diff --git a/llvm/test/DebugInfo/PDB/every-type.test b/llvm/test/DebugInfo/PDB/every-type.test new file mode 100644 index 00000000000..e6b9c15815d --- /dev/null +++ b/llvm/test/DebugInfo/PDB/every-type.test @@ -0,0 +1,261 @@ +The test input (every-type.pdb) is generated from some short and trivial C++ code +that exercises the entire type system to generate every possible type record that +we claim to understand. We then test this in two ways: + 1) We just dump the output for the purposes of readability. This tests that we + we can dump every possible type record. + 2) We dump the output to yaml, and then re-generate a PDB with the same type + stream, and then run test 1 on the new PDB. This verifies that the PDB + hasn't changed. + + +RUN: llvm-pdbutil dump -type-index=0x1018,0x102A,0x103B,0x1093,0x1095,0x1096,0x1098 \ +RUN: -dependents %p/Inputs/every-type.pdb | FileCheck --check-prefix=TYPES %s + +RUN: llvm-pdbutil pdb2yaml -tpi-stream -ipi-stream %p/Inputs/every-type.pdb > %t.pdb.yaml +RUN: llvm-pdbutil yaml2pdb -pdb=%t.yaml.pdb %t.pdb.yaml +RUN: llvm-pdbutil dump -type-index=0x1018,0x102A,0x103B,0x1093,0x1095,0x1096,0x1098 \ +RUN: -dependents %t.yaml.pdb | FileCheck --check-prefix=TYPES %s + +TYPES: Types (TPI Stream) +TYPES-NEXT: ============================================================ +TYPES-NEXT: Showing 7 records and their dependents (73 records total) +TYPES-NEXT: 0x1005 | LF_MODIFIER [size = 12] +TYPES-NEXT: referent = 0x0074 (int), modifiers = const +TYPES-NEXT: 0x1006 | LF_CLASS [size = 48] `FooClass` +TYPES-NEXT: unique name: `.?AVFooClass@@` +TYPES-NEXT: vtable: <no type>, base list: <no type>, field list: <no type> +TYPES-NEXT: options: forward ref | has unique name +TYPES-NEXT: 0x1007 | LF_VTSHAPE [size = 8] +TYPES-NEXT: 0x1008 | LF_POINTER [size = 12] +TYPES-NEXT: referent = 0x1007, mode = pointer, opts = None, kind = ptr32 +TYPES-NEXT: 0x1009 | LF_CLASS [size = 44] `Inherit` +TYPES-NEXT: unique name: `.?AVInherit@@` +TYPES-NEXT: vtable: <no type>, base list: <no type>, field list: <no type> +TYPES-NEXT: options: forward ref | has unique name +TYPES-NEXT: 0x100A | LF_POINTER [size = 12] +TYPES-NEXT: referent = 0x1009, mode = pointer, opts = const, kind = ptr32 +TYPES-NEXT: 0x100B | LF_ARGLIST [size = 8] +TYPES-NEXT: 0x100C | LF_MFUNCTION [size = 28] +TYPES-NEXT: return type = 0x0003 (void), # args = 0, param list = 0x100B +TYPES-NEXT: class type = 0x1009, this type = 0x100A, this adjust = 0 +TYPES-NEXT: calling conv = thiscall, options = None +TYPES-NEXT: 0x100D | LF_MODIFIER [size = 12] +TYPES-NEXT: referent = 0x1009, modifiers = const +TYPES-NEXT: 0x100E | LF_POINTER [size = 12] +TYPES-NEXT: referent = 0x100D, mode = ref, opts = None, kind = ptr32 +TYPES-NEXT: 0x100F | LF_ARGLIST [size = 12] +TYPES-NEXT: 0x100E: `const Inherit&` +TYPES-NEXT: 0x1010 | LF_MFUNCTION [size = 28] +TYPES-NEXT: return type = 0x0003 (void), # args = 1, param list = 0x100F +TYPES-NEXT: class type = 0x1009, this type = 0x100A, this adjust = 0 +TYPES-NEXT: calling conv = thiscall, options = constructor +TYPES-NEXT: 0x1011 | LF_MFUNCTION [size = 28] +TYPES-NEXT: return type = 0x0003 (void), # args = 0, param list = 0x100B +TYPES-NEXT: class type = 0x1009, this type = 0x100A, this adjust = 0 +TYPES-NEXT: calling conv = thiscall, options = constructor +TYPES-NEXT: 0x1012 | LF_METHODLIST [size = 20] +TYPES-NEXT: - Method [type = 0x1010, vftable offset = -1, attrs = public compiler-generated] +TYPES-NEXT: - Method [type = 0x1011, vftable offset = -1, attrs = public compiler-generated] +TYPES-NEXT: 0x1013 | LF_POINTER [size = 12] +TYPES-NEXT: referent = 0x1009, mode = ref, opts = None, kind = ptr32 +TYPES-NEXT: 0x1014 | LF_MFUNCTION [size = 28] +TYPES-NEXT: return type = 0x1013, # args = 1, param list = 0x100F +TYPES-NEXT: class type = 0x1009, this type = 0x100A, this adjust = 0 +TYPES-NEXT: calling conv = thiscall, options = None +TYPES-NEXT: 0x1015 | LF_ARGLIST [size = 12] +TYPES-NEXT: 0x0075 (unsigned): `unsigned` +TYPES-NEXT: 0x1016 | LF_MFUNCTION [size = 28] +TYPES-NEXT: return type = 0x0403 (void*), # args = 1, param list = 0x1015 +TYPES-NEXT: class type = 0x1009, this type = 0x100A, this adjust = 0 +TYPES-NEXT: calling conv = thiscall, options = None +TYPES-NEXT: 0x1017 | LF_FIELDLIST [size = 152] +TYPES-NEXT: - LF_BCLASS +TYPES-NEXT: type = 0x1006, offset = 4, attrs = public +TYPES-NEXT: - LF_VFUNCTAB type = 0x1008 +TYPES-NEXT: - LF_ONEMETHOD [name = `~Inherit`] +TYPES-NEXT: type = 0x100C, vftable offset = 0, attrs = public intro virtual +TYPES-NEXT: - LF_METHOD [name = `Inherit`, # overloads = 2, overload list = 0x1012] +TYPES-NEXT: - LF_ONEMETHOD [name = `operator=`] +TYPES-NEXT: type = 0x1014, vftable offset = -1, attrs = public compiler-generated +TYPES-NEXT: - LF_ONEMETHOD [name = `__local_vftable_ctor_closure`] +TYPES-NEXT: type = 0x100C, vftable offset = -1, attrs = public compiler-generated +TYPES-NEXT: - LF_ONEMETHOD [name = `__vecDelDtor`] +TYPES-NEXT: type = 0x1016, vftable offset = 0, attrs = public intro virtual compiler-generated +TYPES-NEXT: 0x1018 | LF_CLASS [size = 44] `Inherit` +TYPES-NEXT: unique name: `.?AVInherit@@` +TYPES-NEXT: vtable: 0x1007, base list: <no type>, field list: 0x1017 +TYPES-NEXT: options: has ctor / dtor | has unique name | overloaded operator | overloaded operator= +TYPES-NEXT: 0x1019 | LF_POINTER [size = 12] +TYPES-NEXT: referent = 0x1005, mode = pointer, opts = None, kind = ptr32 +TYPES-NEXT: 0x101A | LF_CLASS [size = 48] `VInherit` +TYPES-NEXT: unique name: `.?AVVInherit@@` +TYPES-NEXT: vtable: <no type>, base list: <no type>, field list: <no type> +TYPES-NEXT: options: forward ref | has unique name +TYPES-NEXT: 0x101B | LF_POINTER [size = 12] +TYPES-NEXT: referent = 0x101A, mode = pointer, opts = const, kind = ptr32 +TYPES-NEXT: 0x101C | LF_POINTER [size = 12] +TYPES-NEXT: referent = 0x101A, mode = rvalue ref, opts = None, kind = ptr32 +TYPES-NEXT: 0x101D | LF_ARGLIST [size = 12] +TYPES-NEXT: 0x101C: `VInherit&&` +TYPES-NEXT: 0x101E | LF_MFUNCTION [size = 28] +TYPES-NEXT: return type = 0x0003 (void), # args = 1, param list = 0x101D +TYPES-NEXT: class type = 0x101A, this type = 0x101B, this adjust = 0 +TYPES-NEXT: calling conv = thiscall, options = constructor with virtual bases | constructor +TYPES-NEXT: 0x101F | LF_MODIFIER [size = 12] +TYPES-NEXT: referent = 0x101A, modifiers = const +TYPES-NEXT: 0x1020 | LF_POINTER [size = 12] +TYPES-NEXT: referent = 0x101F, mode = ref, opts = None, kind = ptr32 +TYPES-NEXT: 0x1021 | LF_ARGLIST [size = 12] +TYPES-NEXT: 0x1020: `const VInherit&` +TYPES-NEXT: 0x1022 | LF_MFUNCTION [size = 28] +TYPES-NEXT: return type = 0x0003 (void), # args = 1, param list = 0x1021 +TYPES-NEXT: class type = 0x101A, this type = 0x101B, this adjust = 0 +TYPES-NEXT: calling conv = thiscall, options = constructor with virtual bases | constructor +TYPES-NEXT: 0x1023 | LF_MFUNCTION [size = 28] +TYPES-NEXT: return type = 0x0003 (void), # args = 0, param list = 0x100B +TYPES-NEXT: class type = 0x101A, this type = 0x101B, this adjust = 0 +TYPES-NEXT: calling conv = thiscall, options = constructor with virtual bases | constructor +TYPES-NEXT: 0x1024 | LF_METHODLIST [size = 28] +TYPES-NEXT: - Method [type = 0x101E, vftable offset = -1, attrs = public compiler-generated] +TYPES-NEXT: - Method [type = 0x1022, vftable offset = -1, attrs = public compiler-generated] +TYPES-NEXT: - Method [type = 0x1023, vftable offset = -1, attrs = public compiler-generated] +TYPES-NEXT: 0x1025 | LF_POINTER [size = 12] +TYPES-NEXT: referent = 0x101A, mode = ref, opts = None, kind = ptr32 +TYPES-NEXT: 0x1026 | LF_MFUNCTION [size = 28] +TYPES-NEXT: return type = 0x1025, # args = 1, param list = 0x101D +TYPES-NEXT: class type = 0x101A, this type = 0x101B, this adjust = 0 +TYPES-NEXT: calling conv = thiscall, options = None +TYPES-NEXT: 0x1027 | LF_MFUNCTION [size = 28] +TYPES-NEXT: return type = 0x1025, # args = 1, param list = 0x1021 +TYPES-NEXT: class type = 0x101A, this type = 0x101B, this adjust = 0 +TYPES-NEXT: calling conv = thiscall, options = None +TYPES-NEXT: 0x1028 | LF_METHODLIST [size = 20] +TYPES-NEXT: - Method [type = 0x1026, vftable offset = -1, attrs = public compiler-generated] +TYPES-NEXT: - Method [type = 0x1027, vftable offset = -1, attrs = public compiler-generated] +TYPES-NEXT: 0x1029 | LF_FIELDLIST [size = 60] +TYPES-NEXT: - LF_VBCLASS +TYPES-NEXT: base = 0x1006, vbptr = 0x1019, vbptr offset = 0, vtable index = 1 +TYPES-NEXT: attrs = public +TYPES-NEXT: - LF_METHOD [name = `VInherit`, # overloads = 3, overload list = 0x1024] +TYPES-NEXT: - LF_METHOD [name = `operator=`, # overloads = 2, overload list = 0x1028] +TYPES-NEXT: 0x102A | LF_CLASS [size = 48] `VInherit` +TYPES-NEXT: unique name: `.?AVVInherit@@` +TYPES-NEXT: vtable: <no type>, base list: <no type>, field list: 0x1029 +TYPES-NEXT: options: has ctor / dtor | has unique name | overloaded operator | overloaded operator= +TYPES-NEXT: 0x102B | LF_CLASS [size = 48] `IVInherit` +TYPES-NEXT: unique name: `.?AVIVInherit@@` +TYPES-NEXT: vtable: <no type>, base list: <no type>, field list: <no type> +TYPES-NEXT: options: forward ref | has unique name +TYPES-NEXT: 0x102C | LF_POINTER [size = 12] +TYPES-NEXT: referent = 0x102B, mode = pointer, opts = const, kind = ptr32 +TYPES-NEXT: 0x102D | LF_POINTER [size = 12] +TYPES-NEXT: referent = 0x102B, mode = rvalue ref, opts = None, kind = ptr32 +TYPES-NEXT: 0x102E | LF_ARGLIST [size = 12] +TYPES-NEXT: 0x102D: `IVInherit&&` +TYPES-NEXT: 0x102F | LF_MFUNCTION [size = 28] +TYPES-NEXT: return type = 0x0003 (void), # args = 1, param list = 0x102E +TYPES-NEXT: class type = 0x102B, this type = 0x102C, this adjust = 0 +TYPES-NEXT: calling conv = thiscall, options = constructor with virtual bases | constructor +TYPES-NEXT: 0x1030 | LF_MODIFIER [size = 12] +TYPES-NEXT: referent = 0x102B, modifiers = const +TYPES-NEXT: 0x1031 | LF_POINTER [size = 12] +TYPES-NEXT: referent = 0x1030, mode = ref, opts = None, kind = ptr32 +TYPES-NEXT: 0x1032 | LF_ARGLIST [size = 12] +TYPES-NEXT: 0x1031: `const IVInherit&` +TYPES-NEXT: 0x1033 | LF_MFUNCTION [size = 28] +TYPES-NEXT: return type = 0x0003 (void), # args = 1, param list = 0x1032 +TYPES-NEXT: class type = 0x102B, this type = 0x102C, this adjust = 0 +TYPES-NEXT: calling conv = thiscall, options = constructor with virtual bases | constructor +TYPES-NEXT: 0x1034 | LF_MFUNCTION [size = 28] +TYPES-NEXT: return type = 0x0003 (void), # args = 0, param list = 0x100B +TYPES-NEXT: class type = 0x102B, this type = 0x102C, this adjust = 0 +TYPES-NEXT: calling conv = thiscall, options = constructor with virtual bases | constructor +TYPES-NEXT: 0x1035 | LF_METHODLIST [size = 28] +TYPES-NEXT: - Method [type = 0x102F, vftable offset = -1, attrs = public compiler-generated] +TYPES-NEXT: - Method [type = 0x1033, vftable offset = -1, attrs = public compiler-generated] +TYPES-NEXT: - Method [type = 0x1034, vftable offset = -1, attrs = public compiler-generated] +TYPES-NEXT: 0x1036 | LF_POINTER [size = 12] +TYPES-NEXT: referent = 0x102B, mode = ref, opts = None, kind = ptr32 +TYPES-NEXT: 0x1037 | LF_MFUNCTION [size = 28] +TYPES-NEXT: return type = 0x1036, # args = 1, param list = 0x102E +TYPES-NEXT: class type = 0x102B, this type = 0x102C, this adjust = 0 +TYPES-NEXT: calling conv = thiscall, options = None +TYPES-NEXT: 0x1038 | LF_MFUNCTION [size = 28] +TYPES-NEXT: return type = 0x1036, # args = 1, param list = 0x1032 +TYPES-NEXT: class type = 0x102B, this type = 0x102C, this adjust = 0 +TYPES-NEXT: calling conv = thiscall, options = None +TYPES-NEXT: 0x1039 | LF_METHODLIST [size = 20] +TYPES-NEXT: - Method [type = 0x1037, vftable offset = -1, attrs = public compiler-generated] +TYPES-NEXT: - Method [type = 0x1038, vftable offset = -1, attrs = public compiler-generated] +TYPES-NEXT: 0x103A | LF_FIELDLIST [size = 72] +TYPES-NEXT: - LF_BCLASS +TYPES-NEXT: type = 0x101A, offset = 0, attrs = public +TYPES-NEXT: - LF_IVBCLASS +TYPES-NEXT: base = 0x1006, vbptr = 0x1019, vbptr offset = 0, vtable index = 1 +TYPES-NEXT: attrs = public +TYPES-NEXT: - LF_METHOD [name = `IVInherit`, # overloads = 3, overload list = 0x1035] +TYPES-NEXT: - LF_METHOD [name = `operator=`, # overloads = 2, overload list = 0x1039] +TYPES-NEXT: 0x103B | LF_CLASS [size = 48] `IVInherit` +TYPES-NEXT: unique name: `.?AVIVInherit@@` +TYPES-NEXT: vtable: <no type>, base list: <no type>, field list: 0x103A +TYPES-NEXT: options: has ctor / dtor | has unique name | overloaded operator | overloaded operator= +TYPES-NEXT: 0x1087 | LF_FIELDLIST [size = 28] +TYPES-NEXT: - LF_ENUMERATE [A = 0] +TYPES-NEXT: - LF_ENUMERATE [B = 1] +TYPES-NEXT: - LF_ENUMERATE [C = 2] +TYPES-NEXT: 0x1088 | LF_ENUM [size = 64] `FooClass::NestedEnum` +TYPES-NEXT: unique name: `.?AW4NestedEnum@FooClass@@` +TYPES-NEXT: field list: 0x1087, underlying type: 0x0074 (int) +TYPES-NEXT: options: has unique name | is nested +TYPES-NEXT: 0x1089 | LF_POINTER [size = 12] +TYPES-NEXT: referent = 0x1006, mode = pointer, opts = const, kind = ptr32 +TYPES-NEXT: 0x108A | LF_MFUNCTION [size = 28] +TYPES-NEXT: return type = 0x0003 (void), # args = 0, param list = 0x100B +TYPES-NEXT: class type = 0x1006, this type = 0x1089, this adjust = 0 +TYPES-NEXT: calling conv = thiscall, options = None +TYPES-NEXT: 0x108B | LF_ARGLIST [size = 16] +TYPES-NEXT: 0x0074 (int): `int` +TYPES-NEXT: 0x0074 (int): `int` +TYPES-NEXT: 0x108C | LF_MFUNCTION [size = 28] +TYPES-NEXT: return type = 0x0003 (void), # args = 2, param list = 0x108B +TYPES-NEXT: class type = 0x1006, this type = 0x1089, this adjust = 0 +TYPES-NEXT: calling conv = thiscall, options = None +TYPES-NEXT: 0x108D | LF_ARGLIST [size = 12] +TYPES-NEXT: 0x0074 (int): `int` +TYPES-NEXT: 0x108E | LF_MFUNCTION [size = 28] +TYPES-NEXT: return type = 0x0003 (void), # args = 1, param list = 0x108D +TYPES-NEXT: class type = 0x1006, this type = 0x1089, this adjust = 0 +TYPES-NEXT: calling conv = thiscall, options = None +TYPES-NEXT: 0x108F | LF_METHODLIST [size = 20] +TYPES-NEXT: - Method [type = 0x108C, vftable offset = -1, attrs = private] +TYPES-NEXT: - Method [type = 0x108E, vftable offset = -1, attrs = private] +TYPES-NEXT: 0x1090 | LF_BITFIELD [size = 12] +TYPES-NEXT: type = 0x0074 (int), bit offset = 0, # bits = 4 +TYPES-NEXT: 0x1091 | LF_BITFIELD [size = 12] +TYPES-NEXT: type = 0x0074 (int), bit offset = 4, # bits = 4 +TYPES-NEXT: 0x1092 | LF_FIELDLIST [size = 164] +TYPES-NEXT: - LF_NESTTYPE [name = `NestedEnum`, parent = 0x1088] +TYPES-NEXT: - LF_ONEMETHOD [name = `RegularMethod`] +TYPES-NEXT: type = 0x108A, vftable offset = -1, attrs = private +TYPES-NEXT: - LF_METHOD [name = `OverloadedMethod`, # overloads = 2, overload list = 0x108F] +TYPES-NEXT: - LF_MEMBER [name = `HiNibble`, Type = 0x1090, offset = 0, attrs = private] +TYPES-NEXT: - LF_MEMBER [name = `LoNibble`, Type = 0x1091, offset = 0, attrs = private] +TYPES-NEXT: - LF_MEMBER [name = `EnumVariable`, Type = 0x1088, offset = 4, attrs = private] +TYPES-NEXT: - LF_STMEMBER [name = `StaticMember`, type = 0x0403 (void*), attrs = private] +TYPES-NEXT: 0x1093 | LF_CLASS [size = 48] `FooClass` +TYPES-NEXT: unique name: `.?AVFooClass@@` +TYPES-NEXT: vtable: <no type>, base list: <no type>, field list: 0x1092 +TYPES-NEXT: options: contains nested class | has unique name +TYPES-NEXT: 0x1094 | LF_FIELDLIST [size = 16] +TYPES-NEXT: - LF_MEMBER [name = `X`, Type = 0x0074 (int), offset = 0, attrs = public] +TYPES-NEXT: 0x1095 | LF_UNION [size = 40] `TheUnion` +TYPES-NEXT: unique name: `.?ATTheUnion@@` +TYPES-NEXT: field list: 0x1094 +TYPES-NEXT: options: has unique name | sealed +TYPES-NEXT: 0x1096 | LF_PROCEDURE [size = 16] +TYPES-NEXT: return type = 0x0003 (void), # args = 0, param list = 0x100B +TYPES-NEXT: calling conv = cdecl, options = None +TYPES-NEXT: 0x1097 | LF_POINTER [size = 12] +TYPES-NEXT: referent = 0x1096, mode = pointer, opts = const, kind = ptr32 +TYPES-NEXT: 0x1098 | LF_ARRAY [size = 16] +TYPES-NEXT: size: 4, index type: 0x0022 (unsigned long), element type: 0x1097 diff --git a/llvm/test/DebugInfo/PDB/pdbdump-headers.test b/llvm/test/DebugInfo/PDB/pdbdump-headers.test index 3b7895e06b7..c3eb9bdb8b7 100644 --- a/llvm/test/DebugInfo/PDB/pdbdump-headers.test +++ b/llvm/test/DebugInfo/PDB/pdbdump-headers.test @@ -99,13 +99,11 @@ ALL-NEXT: - LF_ENUMERATE [single = 2] ALL-NEXT: - LF_ENUMERATE [free = 3] ALL-NEXT: - LF_ENUMERATE [neutral = 4] ALL-NEXT: - LF_ENUMERATE [both = 5] -ALL-NEXT: 0x1003 | LF_ENUM [size = 120, hash = 208239] -ALL-NEXT: name: `__vc_attributes::threadingAttribute::threading_e` +ALL-NEXT: 0x1003 | LF_ENUM [size = 120, hash = 208239] `__vc_attributes::threadingAttribute::threading_e` ALL-NEXT: unique name: `.?AW4threading_e@threadingAttribute@__vc_attributes@@` ALL-NEXT: field list: 0x1002, underlying type: 0x0074 (int) ALL-NEXT: options: has unique name | is nested -ALL-NEXT: 0x1004 | LF_STRUCTURE [size = 100, hash = 16377] -ALL-NEXT: class name: `__vc_attributes::threadingAttribute` +ALL-NEXT: 0x1004 | LF_STRUCTURE [size = 100, hash = 16377] `__vc_attributes::threadingAttribute` ALL-NEXT: unique name: `.?AUthreadingAttribute@__vc_attributes@@` ALL-NEXT: vtable: <no type>, base list: <no type>, field list: <no type> ALL-NEXT: options: forward ref | has unique name @@ -128,8 +126,7 @@ ALL-NEXT: 0x100A | LF_FIELDLIST [size = 68, hash = 185421] ALL-NEXT: - LF_NESTTYPE [name = `threading_e`, parent = 0x1003] ALL-NEXT: - LF_METHOD [name = `threadingAttribute`, # overloads = 2, overload list = 0x1009] ALL-NEXT: - LF_MEMBER [name = `value`, Type = 0x1003, offset = 0, attrs = public] -ALL-NEXT: 0x100B | LF_STRUCTURE [size = 100, hash = 119540] -ALL-NEXT: class name: `__vc_attributes::threadingAttribute` +ALL-NEXT: 0x100B | LF_STRUCTURE [size = 100, hash = 119540] `__vc_attributes::threadingAttribute` ALL-NEXT: unique name: `.?AUthreadingAttribute@__vc_attributes@@` ALL-NEXT: vtable: <no type>, base list: <no type>, field list: 0x100A ALL-NEXT: options: has ctor / dtor | contains nested class | has unique name @@ -137,13 +134,11 @@ ALL-NEXT: 0x100C | LF_FIELDLIST [size = 48, hash = 261871] ALL-NEXT: - LF_ENUMERATE [native = 0] ALL-NEXT: - LF_ENUMERATE [com = 1] ALL-NEXT: - LF_ENUMERATE [managed = 2] -ALL-NEXT: 0x100D | LF_ENUM [size = 120, hash = 198119] -ALL-NEXT: name: `__vc_attributes::event_receiverAttribute::type_e` +ALL-NEXT: 0x100D | LF_ENUM [size = 120, hash = 198119] `__vc_attributes::event_receiverAttribute::type_e` ALL-NEXT: unique name: `.?AW4type_e@event_receiverAttribute@__vc_attributes@@` ALL-NEXT: field list: 0x100C, underlying type: 0x0074 (int) ALL-NEXT: options: has unique name | is nested -ALL-NEXT: 0x100E | LF_STRUCTURE [size = 112, hash = 48056] -ALL-NEXT: class name: `__vc_attributes::event_receiverAttribute` +ALL-NEXT: 0x100E | LF_STRUCTURE [size = 112, hash = 48056] `__vc_attributes::event_receiverAttribute` ALL-NEXT: unique name: `.?AUevent_receiverAttribute@__vc_attributes@@` ALL-NEXT: vtable: <no type>, base list: <no type>, field list: <no type> ALL-NEXT: options: forward ref | has unique name @@ -175,8 +170,7 @@ ALL-NEXT: - LF_NESTTYPE [name = `type_e`, parent = 0x100D] ALL-NEXT: - LF_METHOD [name = `event_receiverAttribute`, # overloads = 3, overload list = 0x1015] ALL-NEXT: - LF_MEMBER [name = `type`, Type = 0x100D, offset = 0, attrs = public] ALL-NEXT: - LF_MEMBER [name = `layout_dependent`, Type = 0x0030 (bool), offset = 4, attrs = public] -ALL-NEXT: 0x1017 | LF_STRUCTURE [size = 112, hash = 148734] -ALL-NEXT: class name: `__vc_attributes::event_receiverAttribute` +ALL-NEXT: 0x1017 | LF_STRUCTURE [size = 112, hash = 148734] `__vc_attributes::event_receiverAttribute` ALL-NEXT: unique name: `.?AUevent_receiverAttribute@__vc_attributes@@` ALL-NEXT: vtable: <no type>, base list: <no type>, field list: 0x1016 ALL-NEXT: options: has ctor / dtor | contains nested class | has unique name @@ -184,13 +178,11 @@ ALL-NEXT: 0x1018 | LF_FIELDLIST [size = 48, hash = 81128] ALL-NEXT: - LF_ENUMERATE [never = 0] ALL-NEXT: - LF_ENUMERATE [allowed = 1] ALL-NEXT: - LF_ENUMERATE [always = 2] -ALL-NEXT: 0x1019 | LF_ENUM [size = 116, hash = 60158] -ALL-NEXT: name: `__vc_attributes::aggregatableAttribute::type_e` +ALL-NEXT: 0x1019 | LF_ENUM [size = 116, hash = 60158] `__vc_attributes::aggregatableAttribute::type_e` ALL-NEXT: unique name: `.?AW4type_e@aggregatableAttribute@__vc_attributes@@` ALL-NEXT: field list: 0x1018, underlying type: 0x0074 (int) ALL-NEXT: options: has unique name | is nested -ALL-NEXT: 0x101A | LF_STRUCTURE [size = 108, hash = 217249] -ALL-NEXT: class name: `__vc_attributes::aggregatableAttribute` +ALL-NEXT: 0x101A | LF_STRUCTURE [size = 108, hash = 217249] `__vc_attributes::aggregatableAttribute` ALL-NEXT: unique name: `.?AUaggregatableAttribute@__vc_attributes@@` ALL-NEXT: vtable: <no type>, base list: <no type>, field list: <no type> ALL-NEXT: options: forward ref | has unique name @@ -213,26 +205,22 @@ ALL-NEXT: 0x1020 | LF_FIELDLIST [size = 68, hash = 6214] ALL-NEXT: - LF_NESTTYPE [name = `type_e`, parent = 0x1019] ALL-NEXT: - LF_METHOD [name = `aggregatableAttribute`, # overloads = 2, overload list = 0x101F] ALL-NEXT: - LF_MEMBER [name = `type`, Type = 0x1019, offset = 0, attrs = public] -ALL-NEXT: 0x1021 | LF_STRUCTURE [size = 108, hash = 94935] -ALL-NEXT: class name: `__vc_attributes::aggregatableAttribute` +ALL-NEXT: 0x1021 | LF_STRUCTURE [size = 108, hash = 94935] `__vc_attributes::aggregatableAttribute` ALL-NEXT: unique name: `.?AUaggregatableAttribute@__vc_attributes@@` ALL-NEXT: vtable: <no type>, base list: <no type>, field list: 0x1020 ALL-NEXT: options: has ctor / dtor | contains nested class | has unique name -ALL-NEXT: 0x1022 | LF_ENUM [size = 116, hash = 151449] -ALL-NEXT: name: `__vc_attributes::event_sourceAttribute::type_e` +ALL-NEXT: 0x1022 | LF_ENUM [size = 116, hash = 151449] `__vc_attributes::event_sourceAttribute::type_e` ALL-NEXT: unique name: `.?AW4type_e@event_sourceAttribute@__vc_attributes@@` ALL-NEXT: field list: 0x100C, underlying type: 0x0074 (int) ALL-NEXT: options: has unique name | is nested ALL-NEXT: 0x1023 | LF_FIELDLIST [size = 28, hash = 135589] ALL-NEXT: - LF_ENUMERATE [speed = 0] ALL-NEXT: - LF_ENUMERATE [size = 1] -ALL-NEXT: 0x1024 | LF_ENUM [size = 124, hash = 73373] -ALL-NEXT: name: `__vc_attributes::event_sourceAttribute::optimize_e` +ALL-NEXT: 0x1024 | LF_ENUM [size = 124, hash = 73373] `__vc_attributes::event_sourceAttribute::optimize_e` ALL-NEXT: unique name: `.?AW4optimize_e@event_sourceAttribute@__vc_attributes@@` ALL-NEXT: field list: 0x1023, underlying type: 0x0074 (int) ALL-NEXT: options: has unique name | is nested -ALL-NEXT: 0x1025 | LF_STRUCTURE [size = 108, hash = 96512] -ALL-NEXT: class name: `__vc_attributes::event_sourceAttribute` +ALL-NEXT: 0x1025 | LF_STRUCTURE [size = 108, hash = 96512] `__vc_attributes::event_sourceAttribute` ALL-NEXT: unique name: `.?AUevent_sourceAttribute@__vc_attributes@@` ALL-NEXT: vtable: <no type>, base list: <no type>, field list: <no type> ALL-NEXT: options: forward ref | has unique name @@ -258,8 +246,7 @@ ALL-NEXT: - LF_METHOD [name = `event_sourceAttribute`, # overloads = ALL-NEXT: - LF_MEMBER [name = `type`, Type = 0x1022, offset = 0, attrs = public] ALL-NEXT: - LF_MEMBER [name = `optimize`, Type = 0x1024, offset = 4, attrs = public] ALL-NEXT: - LF_MEMBER [name = `decorate`, Type = 0x0030 (bool), offset = 8, attrs = public] -ALL-NEXT: 0x102C | LF_STRUCTURE [size = 108, hash = 238560] -ALL-NEXT: class name: `__vc_attributes::event_sourceAttribute` +ALL-NEXT: 0x102C | LF_STRUCTURE [size = 108, hash = 238560] `__vc_attributes::event_sourceAttribute` ALL-NEXT: unique name: `.?AUevent_sourceAttribute@__vc_attributes@@` ALL-NEXT: vtable: <no type>, base list: <no type>, field list: 0x102B ALL-NEXT: options: has ctor / dtor | contains nested class | has unique name @@ -270,13 +257,11 @@ ALL-NEXT: - LF_ENUMERATE [service = 3] ALL-NEXT: - LF_ENUMERATE [unspecified = 4] ALL-NEXT: - LF_ENUMERATE [EXE = 2] ALL-NEXT: - LF_ENUMERATE [SERVICE = 3] -ALL-NEXT: 0x102E | LF_ENUM [size = 104, hash = 115151] -ALL-NEXT: name: `__vc_attributes::moduleAttribute::type_e` +ALL-NEXT: 0x102E | LF_ENUM [size = 104, hash = 115151] `__vc_attributes::moduleAttribute::type_e` ALL-NEXT: unique name: `.?AW4type_e@moduleAttribute@__vc_attributes@@` ALL-NEXT: field list: 0x102D, underlying type: 0x0074 (int) ALL-NEXT: options: has unique name | is nested -ALL-NEXT: 0x102F | LF_STRUCTURE [size = 96, hash = 197306] -ALL-NEXT: class name: `__vc_attributes::moduleAttribute` +ALL-NEXT: 0x102F | LF_STRUCTURE [size = 96, hash = 197306] `__vc_attributes::moduleAttribute` ALL-NEXT: unique name: `.?AUmoduleAttribute@__vc_attributes@@` ALL-NEXT: vtable: <no type>, base list: <no type>, field list: <no type> ALL-NEXT: options: forward ref | has unique name @@ -338,8 +323,7 @@ ALL-NEXT: - LF_MEMBER [name = `hidden`, Type = 0x0030 (bool), offset ALL-NEXT: - LF_MEMBER [name = `restricted`, Type = 0x0030 (bool), offset = 45, attrs = public] ALL-NEXT: - LF_MEMBER [name = `custom`, Type = 0x1032, offset = 48, attrs = public] ALL-NEXT: - LF_MEMBER [name = `resource_name`, Type = 0x1032, offset = 52, attrs = public] -ALL-NEXT: 0x103A | LF_STRUCTURE [size = 96, hash = 98548] -ALL-NEXT: class name: `__vc_attributes::moduleAttribute` +ALL-NEXT: 0x103A | LF_STRUCTURE [size = 96, hash = 98548] `__vc_attributes::moduleAttribute` ALL-NEXT: unique name: `.?AUmoduleAttribute@__vc_attributes@@` ALL-NEXT: vtable: <no type>, base list: <no type>, field list: 0x1039 ALL-NEXT: options: has ctor / dtor | contains nested class | has unique name @@ -374,13 +358,11 @@ ALL-NEXT: - LF_ENUMERATE [eModuleUsage = 16777216] ALL-NEXT: - LF_ENUMERATE [eIllegalUsage = 33554432] ALL-NEXT: - LF_ENUMERATE [eAsynchronousUsage = 67108864] ALL-NEXT: - LF_ENUMERATE [eAnyIDLUsage = 4161535] -ALL-NEXT: 0x103C | LF_ENUM [size = 140, hash = 171328] -ALL-NEXT: name: `__vc_attributes::helper_attributes::usageAttribute::usage_e` +ALL-NEXT: 0x103C | LF_ENUM [size = 140, hash = 171328] `__vc_attributes::helper_attributes::usageAttribute::usage_e` ALL-NEXT: unique name: `.?AW4usage_e@usageAttribute@helper_attributes@__vc_attributes@@` ALL-NEXT: field list: 0x103B, underlying type: 0x0074 (int) ALL-NEXT: options: has unique name | is nested -ALL-NEXT: 0x103D | LF_STRUCTURE [size = 128, hash = 203640] -ALL-NEXT: class name: `__vc_attributes::helper_attributes::usageAttribute` +ALL-NEXT: 0x103D | LF_STRUCTURE [size = 128, hash = 203640] `__vc_attributes::helper_attributes::usageAttribute` ALL-NEXT: unique name: `.?AUusageAttribute@helper_attributes@__vc_attributes@@` ALL-NEXT: vtable: <no type>, base list: <no type>, field list: <no type> ALL-NEXT: options: forward ref | has unique name @@ -397,8 +379,7 @@ ALL-NEXT: - LF_NESTTYPE [name = `usage_e`, parent = 0x103C] ALL-NEXT: - LF_ONEMETHOD [name = `usageAttribute`] ALL-NEXT: type = 0x1040, vftable offset = -1, attrs = public ALL-NEXT: - LF_MEMBER [name = `value`, Type = 0x0075 (unsigned), offset = 0, attrs = public] -ALL-NEXT: 0x1042 | LF_STRUCTURE [size = 128, hash = 165040] -ALL-NEXT: class name: `__vc_attributes::helper_attributes::usageAttribute` +ALL-NEXT: 0x1042 | LF_STRUCTURE [size = 128, hash = 165040] `__vc_attributes::helper_attributes::usageAttribute` ALL-NEXT: unique name: `.?AUusageAttribute@helper_attributes@__vc_attributes@@` ALL-NEXT: vtable: <no type>, base list: <no type>, field list: 0x1041 ALL-NEXT: options: has ctor / dtor | contains nested class | has unique name @@ -407,13 +388,11 @@ ALL-NEXT: - LF_ENUMERATE [eBoolean = 0] ALL-NEXT: - LF_ENUMERATE [eInteger = 1] ALL-NEXT: - LF_ENUMERATE [eFloat = 2] ALL-NEXT: - LF_ENUMERATE [eDouble = 3] -ALL-NEXT: 0x1044 | LF_ENUM [size = 148, hash = 142625] -ALL-NEXT: name: `__vc_attributes::helper_attributes::v1_alttypeAttribute::type_e` +ALL-NEXT: 0x1044 | LF_ENUM [size = 148, hash = 142625] `__vc_attributes::helper_attributes::v1_alttypeAttribute::type_e` ALL-NEXT: unique name: `.?AW4type_e@v1_alttypeAttribute@helper_attributes@__vc_attributes@@` ALL-NEXT: field list: 0x1043, underlying type: 0x0074 (int) ALL-NEXT: options: has unique name | is nested -ALL-NEXT: 0x1045 | LF_STRUCTURE [size = 140, hash = 52534] -ALL-NEXT: class name: `__vc_attributes::helper_attributes::v1_alttypeAttribute` +ALL-NEXT: 0x1045 | LF_STRUCTURE [size = 140, hash = 52534] `__vc_attributes::helper_attributes::v1_alttypeAttribute` ALL-NEXT: unique name: `.?AUv1_alttypeAttribute@helper_attributes@__vc_attributes@@` ALL-NEXT: vtable: <no type>, base list: <no type>, field list: <no type> ALL-NEXT: options: forward ref | has unique name @@ -430,8 +409,7 @@ ALL-NEXT: - LF_NESTTYPE [name = `type_e`, parent = 0x1044] ALL-NEXT: - LF_ONEMETHOD [name = `v1_alttypeAttribute`] ALL-NEXT: type = 0x1048, vftable offset = -1, attrs = public ALL-NEXT: - LF_MEMBER [name = `type`, Type = 0x1044, offset = 0, attrs = public] -ALL-NEXT: 0x104A | LF_STRUCTURE [size = 140, hash = 213215] -ALL-NEXT: class name: `__vc_attributes::helper_attributes::v1_alttypeAttribute` +ALL-NEXT: 0x104A | LF_STRUCTURE [size = 140, hash = 213215] `__vc_attributes::helper_attributes::v1_alttypeAttribute` ALL-NEXT: unique name: `.?AUv1_alttypeAttribute@helper_attributes@__vc_attributes@@` ALL-NEXT: vtable: <no type>, base list: <no type>, field list: 0x1049 ALL-NEXT: options: has ctor / dtor | contains nested class | has unique name diff --git a/llvm/test/DebugInfo/PDB/pdbdump-merge-ids-and-types.test b/llvm/test/DebugInfo/PDB/pdbdump-merge-ids-and-types.test index 3903c07b027..dd4c072fe0c 100644 --- a/llvm/test/DebugInfo/PDB/pdbdump-merge-ids-and-types.test +++ b/llvm/test/DebugInfo/PDB/pdbdump-merge-ids-and-types.test @@ -14,8 +14,7 @@ TPI-TYPES-NEXT: - LF_MEMBER [name = `FooMember`, Type = 0x0403 (void* TPI-TYPES-NEXT: 0x1002 | LF_ARGLIST [size = 16] TPI-TYPES-NEXT: 0x0074 (int): `int` TPI-TYPES-NEXT: 0x1000: `char**` -TPI-TYPES-NEXT: 0x1003 | LF_STRUCTURE [size = 36] -TPI-TYPES-NEXT: class name: `FooBar` +TPI-TYPES-NEXT: 0x1003 | LF_STRUCTURE [size = 36] `FooBar` TPI-TYPES-NEXT: unique name: `FooBar` TPI-TYPES-NEXT: vtable: <no type>, base list: <no type>, field list: 0x1001 TPI-TYPES-NEXT: options: has unique name diff --git a/llvm/test/DebugInfo/PDB/pdbdump-mergetypes.test b/llvm/test/DebugInfo/PDB/pdbdump-mergetypes.test index 8ab64cfab51..60cf4a172aa 100644 --- a/llvm/test/DebugInfo/PDB/pdbdump-mergetypes.test +++ b/llvm/test/DebugInfo/PDB/pdbdump-mergetypes.test @@ -11,8 +11,7 @@ MERGED-NEXT: 0x1000 | LF_POINTER [size = 12] MERGED-NEXT: referent = 0x0075 (unsigned), mode = pointer, opts = None, kind = ptr32 MERGED-NEXT: 0x1001 | LF_POINTER [size = 12] MERGED-NEXT: referent = 0x0076 (__int64), mode = pointer, opts = None, kind = ptr32 -MERGED-NEXT: 0x1002 | LF_STRUCTURE [size = 48] -MERGED-NEXT: class name: `OnlyInMerge1` +MERGED-NEXT: 0x1002 | LF_STRUCTURE [size = 48] `OnlyInMerge1` MERGED-NEXT: unique name: `OnlyInMerge1` MERGED-NEXT: vtable: <no type>, base list: <no type>, field list: <no type> MERGED-NEXT: options: forward ref | has unique name @@ -29,8 +28,7 @@ MERGED-NEXT: 0x1003: `unsigned**` MERGED-NEXT: 0x1007 | LF_PROCEDURE [size = 16] MERGED-NEXT: return type = 0x0075 (unsigned), # args = 0, param list = 0x1006 MERGED-NEXT: calling conv = cdecl, options = None -MERGED-NEXT: 0x1008 | LF_STRUCTURE [size = 48] -MERGED-NEXT: class name: `OnlyInMerge2` +MERGED-NEXT: 0x1008 | LF_STRUCTURE [size = 48] `OnlyInMerge2` MERGED-NEXT: unique name: `OnlyInMerge2` MERGED-NEXT: vtable: <no type>, base list: <no type>, field list: <no type> MERGED-NEXT: options: forward ref | has unique name diff --git a/llvm/test/tools/llvm-pdbdump/partial-type-stream.test b/llvm/test/tools/llvm-pdbdump/partial-type-stream.test index 3a853c39145..7c62acce7ad 100644 --- a/llvm/test/tools/llvm-pdbdump/partial-type-stream.test +++ b/llvm/test/tools/llvm-pdbdump/partial-type-stream.test @@ -17,8 +17,7 @@ DEPS: Types (TPI Stream) DEPS-NEXT: ============================================================ DEPS-NEXT: Showing 1 records and their dependents (4 records total) DEPS-NEXT: 0x100E | LF_ARGLIST [size = 8] -DEPS-NEXT: 0x1017 | LF_CLASS [size = 60] -DEPS-NEXT: class name: `MembersTest::A` +DEPS-NEXT: 0x1017 | LF_CLASS [size = 60] `MembersTest::A` DEPS-NEXT: unique name: `.?AVA@MembersTest@@` DEPS-NEXT: vtable: <no type>, base list: <no type>, field list: <no type> DEPS-NEXT: options: forward ref | has unique name diff --git a/llvm/tools/llvm-pdbutil/MinimalTypeDumper.cpp b/llvm/tools/llvm-pdbutil/MinimalTypeDumper.cpp index 1af53e35ed1..9621320ea99 100644 --- a/llvm/tools/llvm-pdbutil/MinimalTypeDumper.cpp +++ b/llvm/tools/llvm-pdbutil/MinimalTypeDumper.cpp @@ -299,7 +299,7 @@ Error MinimalTypeDumpVisitor::visitKnownRecord(CVType &CVR, Error MinimalTypeDumpVisitor::visitKnownRecord(CVType &CVR, ClassRecord &Class) { - P.formatLine("class name: `{0}`", Class.Name); + P.format(" `{0}`", Class.Name); if (Class.hasUniqueName()) P.formatLine("unique name: `{0}`", Class.UniqueName); P.formatLine("vtable: {0}, base list: {1}, field list: {2}", @@ -311,7 +311,7 @@ Error MinimalTypeDumpVisitor::visitKnownRecord(CVType &CVR, Error MinimalTypeDumpVisitor::visitKnownRecord(CVType &CVR, UnionRecord &Union) { - P.formatLine("class name: `{0}`", Union.Name); + P.format(" `{0}`", Union.Name); if (Union.hasUniqueName()) P.formatLine("unique name: `{0}`", Union.UniqueName); P.formatLine("field list: {0}", Union.FieldList); @@ -321,7 +321,7 @@ Error MinimalTypeDumpVisitor::visitKnownRecord(CVType &CVR, } Error MinimalTypeDumpVisitor::visitKnownRecord(CVType &CVR, EnumRecord &Enum) { - P.formatLine("name: `{0}`", Enum.Name); + P.format(" `{0}`", Enum.Name); if (Enum.hasUniqueName()) P.formatLine("unique name: `{0}`", Enum.UniqueName); P.formatLine("field list: {0}, underlying type: {1}", Enum.FieldList, diff --git a/llvm/tools/llvm-pdbutil/llvm-pdbutil.cpp b/llvm/tools/llvm-pdbutil/llvm-pdbutil.cpp index ad11ad49800..f3bfa8f7b35 100644 --- a/llvm/tools/llvm-pdbutil/llvm-pdbutil.cpp +++ b/llvm/tools/llvm-pdbutil/llvm-pdbutil.cpp @@ -399,7 +399,7 @@ cl::opt<bool> DumpTypeExtras("type-extras", cl::cat(TypeOptions), cl::sub(DumpSubcommand)); cl::list<uint32_t> DumpTypeIndex( - "type-index", cl::ZeroOrMore, + "type-index", cl::ZeroOrMore, cl::CommaSeparated, cl::desc("only dump types with the specified hexadecimal type index"), cl::cat(TypeOptions), cl::sub(DumpSubcommand)); @@ -415,7 +415,7 @@ cl::opt<bool> DumpIdExtras("id-extras", cl::desc("dump id hashes and index offsets"), cl::cat(TypeOptions), cl::sub(DumpSubcommand)); cl::list<uint32_t> DumpIdIndex( - "id-index", cl::ZeroOrMore, + "id-index", cl::ZeroOrMore, cl::CommaSeparated, cl::desc("only dump ids with the specified hexadecimal type index"), cl::cat(TypeOptions), cl::sub(DumpSubcommand)); |