From b210b2b94413d36e27cd1986ecf87c42d5ce8166 Mon Sep 17 00:00:00 2001 From: Nico Weber Date: Sat, 3 Sep 2016 03:18:49 +0000 Subject: [PATCH] Revert r280549. The test it added doesn't pass: http://lab.llvm.org:8011/builders/clang-x64-ninja-win7/builds/15318/steps/ninja%20check%201/logs/FAIL%3A%20LLVM%3A%3Apdbdump-yaml-types.test Command Output (stdout): -- $ "D:/buildslave/clang-x64-ninja-win7/stage1/./bin\llvm-pdbdump.EXE" "pdb2yaml" "-tpi-stream" "D:\buildslave\clang-x64-ninja-win7\llvm\test\DebugInfo\PDB/Inputs/empty.pdb" $ "D:/buildslave/clang-x64-ninja-win7/stage1/./bin\FileCheck.EXE" "-check-prefix=YAML" "D:\buildslave\clang-x64-ninja-win7\llvm\test\DebugInfo\PDB\pdbdump-yaml-types.test" # command stderr: D:\buildslave\clang-x64-ninja-win7\llvm\test\DebugInfo\PDB\pdbdump-yaml-types.test:36:7: error: expected string not found in input YAML: Name: apartment ^ :153:10: note: scanning from here Value: 161 ^ git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@280577 91177308-0d34-0410-b5e6-96231b3b80d8 --- test/DebugInfo/PDB/pdbdump-yaml-types.test | 964 ++++++++++----------- tools/llvm-pdbdump/CodeViewYaml.cpp | 45 - tools/llvm-pdbdump/CodeViewYaml.h | 10 +- 3 files changed, 483 insertions(+), 536 deletions(-) diff --git a/test/DebugInfo/PDB/pdbdump-yaml-types.test b/test/DebugInfo/PDB/pdbdump-yaml-types.test index 1e977254790..0ad407a7ec1 100644 --- a/test/DebugInfo/PDB/pdbdump-yaml-types.test +++ b/test/DebugInfo/PDB/pdbdump-yaml-types.test @@ -29,31 +29,31 @@ YAML: ParameterCount: 0 YAML: ArgumentList: 4096 YAML: - Kind: LF_FIELDLIST YAML: FieldList: -YAML: - Kind: LF_ENUMERATE -YAML: Enumerator: -YAML: Access: Public -YAML: Value: 1 -YAML: Name: apartment -YAML: - Kind: LF_ENUMERATE -YAML: Enumerator: -YAML: Access: Public -YAML: Value: 2 -YAML: Name: single -YAML: - Kind: LF_ENUMERATE -YAML: Enumerator: -YAML: Access: Public -YAML: Value: 3 -YAML: Name: free -YAML: - Kind: LF_ENUMERATE -YAML: Enumerator: -YAML: Access: Public -YAML: Value: 4 -YAML: Name: neutral -YAML: - Kind: LF_ENUMERATE -YAML: Enumerator: -YAML: Access: Public -YAML: Value: 5 -YAML: Name: both +YAML: Kind: LF_ENUMERATE +YAML: Enumerator: +YAML: Access: Public +YAML: Value: 1 +YAML: Name: apartment +YAML: Kind: LF_ENUMERATE +YAML: Enumerator: +YAML: Access: Public +YAML: Value: 2 +YAML: Name: single +YAML: Kind: LF_ENUMERATE +YAML: Enumerator: +YAML: Access: Public +YAML: Value: 3 +YAML: Name: free +YAML: Kind: LF_ENUMERATE +YAML: Enumerator: +YAML: Access: Public +YAML: Value: 4 +YAML: Name: neutral +YAML: Kind: LF_ENUMERATE +YAML: Enumerator: +YAML: Access: Public +YAML: Value: 5 +YAML: Name: both YAML: - Kind: LF_ENUM YAML: Enum: YAML: NumEnumerators: 5 @@ -121,21 +121,21 @@ YAML: VFTableOffset: -1 YAML: Name: '' YAML: - Kind: LF_FIELDLIST YAML: FieldList: -YAML: - Kind: LF_NESTTYPE -YAML: NestedType: -YAML: Type: 4099 -YAML: Name: threading_e -YAML: - Kind: LF_METHOD -YAML: OverloadedMethod: -YAML: NumOverloads: 2 -YAML: MethodList: 4105 -YAML: Name: threadingAttribute -YAML: - Kind: LF_MEMBER -YAML: DataMember: -YAML: Access: Public -YAML: Type: 4099 -YAML: FieldOffset: 0 -YAML: Name: value +YAML: Kind: LF_NESTTYPE +YAML: NestedType: +YAML: Type: 4099 +YAML: Name: threading_e +YAML: Kind: LF_METHOD +YAML: OverloadedMethod: +YAML: NumOverloads: 2 +YAML: MethodList: 4105 +YAML: Name: threadingAttribute +YAML: Kind: LF_MEMBER +YAML: DataMember: +YAML: Access: Public +YAML: Type: 4099 +YAML: FieldOffset: 0 +YAML: Name: value YAML: - Kind: LF_STRUCTURE YAML: Class: YAML: MemberCount: 4 @@ -150,21 +150,21 @@ YAML: VTableShape: 0 YAML: Size: 4 YAML: - Kind: LF_FIELDLIST YAML: FieldList: -YAML: - Kind: LF_ENUMERATE -YAML: Enumerator: -YAML: Access: Public -YAML: Value: 0 -YAML: Name: native -YAML: - Kind: LF_ENUMERATE -YAML: Enumerator: -YAML: Access: Public -YAML: Value: 1 -YAML: Name: com -YAML: - Kind: LF_ENUMERATE -YAML: Enumerator: -YAML: Access: Public -YAML: Value: 2 -YAML: Name: managed +YAML: Kind: LF_ENUMERATE +YAML: Enumerator: +YAML: Access: Public +YAML: Value: 0 +YAML: Name: native +YAML: Kind: LF_ENUMERATE +YAML: Enumerator: +YAML: Access: Public +YAML: Value: 1 +YAML: Name: com +YAML: Kind: LF_ENUMERATE +YAML: Enumerator: +YAML: Access: Public +YAML: Value: 2 +YAML: Name: managed YAML: - Kind: LF_ENUM YAML: Enum: YAML: NumEnumerators: 3 @@ -251,27 +251,27 @@ YAML: VFTableOffset: -1 YAML: Name: '' YAML: - Kind: LF_FIELDLIST YAML: FieldList: -YAML: - Kind: LF_NESTTYPE -YAML: NestedType: -YAML: Type: 4109 -YAML: Name: type_e -YAML: - Kind: LF_METHOD -YAML: OverloadedMethod: -YAML: NumOverloads: 3 -YAML: MethodList: 4117 -YAML: Name: event_receiverAttribute -YAML: - Kind: LF_MEMBER -YAML: DataMember: -YAML: Access: Public -YAML: Type: 4109 -YAML: FieldOffset: 0 -YAML: Name: type -YAML: - Kind: LF_MEMBER -YAML: DataMember: -YAML: Access: Public -YAML: Type: 48 -YAML: FieldOffset: 4 -YAML: Name: layout_dependent +YAML: Kind: LF_NESTTYPE +YAML: NestedType: +YAML: Type: 4109 +YAML: Name: type_e +YAML: Kind: LF_METHOD +YAML: OverloadedMethod: +YAML: NumOverloads: 3 +YAML: MethodList: 4117 +YAML: Name: event_receiverAttribute +YAML: Kind: LF_MEMBER +YAML: DataMember: +YAML: Access: Public +YAML: Type: 4109 +YAML: FieldOffset: 0 +YAML: Name: type +YAML: Kind: LF_MEMBER +YAML: DataMember: +YAML: Access: Public +YAML: Type: 48 +YAML: FieldOffset: 4 +YAML: Name: layout_dependent YAML: - Kind: LF_STRUCTURE YAML: Class: YAML: MemberCount: 6 @@ -286,21 +286,21 @@ YAML: VTableShape: 0 YAML: Size: 8 YAML: - Kind: LF_FIELDLIST YAML: FieldList: -YAML: - Kind: LF_ENUMERATE -YAML: Enumerator: -YAML: Access: Public -YAML: Value: 0 -YAML: Name: never -YAML: - Kind: LF_ENUMERATE -YAML: Enumerator: -YAML: Access: Public -YAML: Value: 1 -YAML: Name: allowed -YAML: - Kind: LF_ENUMERATE -YAML: Enumerator: -YAML: Access: Public -YAML: Value: 2 -YAML: Name: always +YAML: Kind: LF_ENUMERATE +YAML: Enumerator: +YAML: Access: Public +YAML: Value: 0 +YAML: Name: never +YAML: Kind: LF_ENUMERATE +YAML: Enumerator: +YAML: Access: Public +YAML: Value: 1 +YAML: Name: allowed +YAML: Kind: LF_ENUMERATE +YAML: Enumerator: +YAML: Access: Public +YAML: Value: 2 +YAML: Name: always YAML: - Kind: LF_ENUM YAML: Enum: YAML: NumEnumerators: 3 @@ -368,21 +368,21 @@ YAML: VFTableOffset: -1 YAML: Name: '' YAML: - Kind: LF_FIELDLIST YAML: FieldList: -YAML: - Kind: LF_NESTTYPE -YAML: NestedType: -YAML: Type: 4121 -YAML: Name: type_e -YAML: - Kind: LF_METHOD -YAML: OverloadedMethod: -YAML: NumOverloads: 2 -YAML: MethodList: 4127 -YAML: Name: aggregatableAttribute -YAML: - Kind: LF_MEMBER -YAML: DataMember: -YAML: Access: Public -YAML: Type: 4121 -YAML: FieldOffset: 0 -YAML: Name: type +YAML: Kind: LF_NESTTYPE +YAML: NestedType: +YAML: Type: 4121 +YAML: Name: type_e +YAML: Kind: LF_METHOD +YAML: OverloadedMethod: +YAML: NumOverloads: 2 +YAML: MethodList: 4127 +YAML: Name: aggregatableAttribute +YAML: Kind: LF_MEMBER +YAML: DataMember: +YAML: Access: Public +YAML: Type: 4121 +YAML: FieldOffset: 0 +YAML: Name: type YAML: - Kind: LF_STRUCTURE YAML: Class: YAML: MemberCount: 4 @@ -405,16 +405,16 @@ YAML: UniqueName: '.?AW4type_e@event_sourceAttribute@__vc_attribute YAML: UnderlyingType: 116 YAML: - Kind: LF_FIELDLIST YAML: FieldList: -YAML: - Kind: LF_ENUMERATE -YAML: Enumerator: -YAML: Access: Public -YAML: Value: 0 -YAML: Name: speed -YAML: - Kind: LF_ENUMERATE -YAML: Enumerator: -YAML: Access: Public -YAML: Value: 1 -YAML: Name: size +YAML: Kind: LF_ENUMERATE +YAML: Enumerator: +YAML: Access: Public +YAML: Value: 0 +YAML: Name: speed +YAML: Kind: LF_ENUMERATE +YAML: Enumerator: +YAML: Access: Public +YAML: Value: 1 +YAML: Name: size YAML: - Kind: LF_ENUM YAML: Enum: YAML: NumEnumerators: 2 @@ -482,37 +482,37 @@ YAML: VFTableOffset: -1 YAML: Name: '' YAML: - Kind: LF_FIELDLIST YAML: FieldList: -YAML: - Kind: LF_NESTTYPE -YAML: NestedType: -YAML: Type: 4130 -YAML: Name: type_e -YAML: - Kind: LF_NESTTYPE -YAML: NestedType: -YAML: Type: 4132 -YAML: Name: optimize_e -YAML: - Kind: LF_METHOD -YAML: OverloadedMethod: -YAML: NumOverloads: 2 -YAML: MethodList: 4138 -YAML: Name: event_sourceAttribute -YAML: - Kind: LF_MEMBER -YAML: DataMember: -YAML: Access: Public -YAML: Type: 4130 -YAML: FieldOffset: 0 -YAML: Name: type -YAML: - Kind: LF_MEMBER -YAML: DataMember: -YAML: Access: Public -YAML: Type: 4132 -YAML: FieldOffset: 4 -YAML: Name: optimize -YAML: - Kind: LF_MEMBER -YAML: DataMember: -YAML: Access: Public -YAML: Type: 48 -YAML: FieldOffset: 8 -YAML: Name: decorate +YAML: Kind: LF_NESTTYPE +YAML: NestedType: +YAML: Type: 4130 +YAML: Name: type_e +YAML: Kind: LF_NESTTYPE +YAML: NestedType: +YAML: Type: 4132 +YAML: Name: optimize_e +YAML: Kind: LF_METHOD +YAML: OverloadedMethod: +YAML: NumOverloads: 2 +YAML: MethodList: 4138 +YAML: Name: event_sourceAttribute +YAML: Kind: LF_MEMBER +YAML: DataMember: +YAML: Access: Public +YAML: Type: 4130 +YAML: FieldOffset: 0 +YAML: Name: type +YAML: Kind: LF_MEMBER +YAML: DataMember: +YAML: Access: Public +YAML: Type: 4132 +YAML: FieldOffset: 4 +YAML: Name: optimize +YAML: Kind: LF_MEMBER +YAML: DataMember: +YAML: Access: Public +YAML: Type: 48 +YAML: FieldOffset: 8 +YAML: Name: decorate YAML: - Kind: LF_STRUCTURE YAML: Class: YAML: MemberCount: 7 @@ -527,36 +527,36 @@ YAML: VTableShape: 0 YAML: Size: 12 YAML: - Kind: LF_FIELDLIST YAML: FieldList: -YAML: - Kind: LF_ENUMERATE -YAML: Enumerator: -YAML: Access: Public -YAML: Value: 1 -YAML: Name: dll -YAML: - Kind: LF_ENUMERATE -YAML: Enumerator: -YAML: Access: Public -YAML: Value: 2 -YAML: Name: exe -YAML: - Kind: LF_ENUMERATE -YAML: Enumerator: -YAML: Access: Public -YAML: Value: 3 -YAML: Name: service -YAML: - Kind: LF_ENUMERATE -YAML: Enumerator: -YAML: Access: Public -YAML: Value: 4 -YAML: Name: unspecified -YAML: - Kind: LF_ENUMERATE -YAML: Enumerator: -YAML: Access: Public -YAML: Value: 2 -YAML: Name: EXE -YAML: - Kind: LF_ENUMERATE -YAML: Enumerator: -YAML: Access: Public -YAML: Value: 3 -YAML: Name: SERVICE +YAML: Kind: LF_ENUMERATE +YAML: Enumerator: +YAML: Access: Public +YAML: Value: 1 +YAML: Name: dll +YAML: Kind: LF_ENUMERATE +YAML: Enumerator: +YAML: Access: Public +YAML: Value: 2 +YAML: Name: exe +YAML: Kind: LF_ENUMERATE +YAML: Enumerator: +YAML: Access: Public +YAML: Value: 3 +YAML: Name: service +YAML: Kind: LF_ENUMERATE +YAML: Enumerator: +YAML: Access: Public +YAML: Value: 4 +YAML: Name: unspecified +YAML: Kind: LF_ENUMERATE +YAML: Enumerator: +YAML: Access: Public +YAML: Value: 2 +YAML: Name: EXE +YAML: Kind: LF_ENUMERATE +YAML: Enumerator: +YAML: Access: Public +YAML: Value: 3 +YAML: Name: SERVICE YAML: - Kind: LF_ENUM YAML: Enum: YAML: NumEnumerators: 6 @@ -655,105 +655,105 @@ YAML: VFTableOffset: -1 YAML: Name: '' YAML: - Kind: LF_FIELDLIST YAML: FieldList: -YAML: - Kind: LF_NESTTYPE -YAML: NestedType: -YAML: Type: 4142 -YAML: Name: type_e -YAML: - Kind: LF_METHOD -YAML: OverloadedMethod: -YAML: NumOverloads: 3 -YAML: MethodList: 4152 -YAML: Name: moduleAttribute -YAML: - Kind: LF_MEMBER -YAML: DataMember: -YAML: Access: Public -YAML: Type: 4142 -YAML: FieldOffset: 0 -YAML: Name: type -YAML: - Kind: LF_MEMBER -YAML: DataMember: -YAML: Access: Public -YAML: Type: 4146 -YAML: FieldOffset: 4 -YAML: Name: name -YAML: - Kind: LF_MEMBER -YAML: DataMember: -YAML: Access: Public -YAML: Type: 4146 -YAML: FieldOffset: 8 -YAML: Name: version -YAML: - Kind: LF_MEMBER -YAML: DataMember: -YAML: Access: Public -YAML: Type: 4146 -YAML: FieldOffset: 12 -YAML: Name: uuid -YAML: - Kind: LF_MEMBER -YAML: DataMember: -YAML: Access: Public -YAML: Type: 116 -YAML: FieldOffset: 16 -YAML: Name: lcid -YAML: - Kind: LF_MEMBER -YAML: DataMember: -YAML: Access: Public -YAML: Type: 48 -YAML: FieldOffset: 20 -YAML: Name: control -YAML: - Kind: LF_MEMBER -YAML: DataMember: -YAML: Access: Public -YAML: Type: 4146 -YAML: FieldOffset: 24 -YAML: Name: helpstring -YAML: - Kind: LF_MEMBER -YAML: DataMember: -YAML: Access: Public -YAML: Type: 116 -YAML: FieldOffset: 28 -YAML: Name: helpstringcontext -YAML: - Kind: LF_MEMBER -YAML: DataMember: -YAML: Access: Public -YAML: Type: 4146 -YAML: FieldOffset: 32 -YAML: Name: helpstringdll -YAML: - Kind: LF_MEMBER -YAML: DataMember: -YAML: Access: Public -YAML: Type: 4146 -YAML: FieldOffset: 36 -YAML: Name: helpfile -YAML: - Kind: LF_MEMBER -YAML: DataMember: -YAML: Access: Public -YAML: Type: 116 -YAML: FieldOffset: 40 -YAML: Name: helpcontext -YAML: - Kind: LF_MEMBER -YAML: DataMember: -YAML: Access: Public -YAML: Type: 48 -YAML: FieldOffset: 44 -YAML: Name: hidden -YAML: - Kind: LF_MEMBER -YAML: DataMember: -YAML: Access: Public -YAML: Type: 48 -YAML: FieldOffset: 45 -YAML: Name: restricted -YAML: - Kind: LF_MEMBER -YAML: DataMember: -YAML: Access: Public -YAML: Type: 4146 -YAML: FieldOffset: 48 -YAML: Name: custom -YAML: - Kind: LF_MEMBER -YAML: DataMember: -YAML: Access: Public -YAML: Type: 4146 -YAML: FieldOffset: 52 -YAML: Name: resource_name +YAML: Kind: LF_NESTTYPE +YAML: NestedType: +YAML: Type: 4142 +YAML: Name: type_e +YAML: Kind: LF_METHOD +YAML: OverloadedMethod: +YAML: NumOverloads: 3 +YAML: MethodList: 4152 +YAML: Name: moduleAttribute +YAML: Kind: LF_MEMBER +YAML: DataMember: +YAML: Access: Public +YAML: Type: 4142 +YAML: FieldOffset: 0 +YAML: Name: type +YAML: Kind: LF_MEMBER +YAML: DataMember: +YAML: Access: Public +YAML: Type: 4146 +YAML: FieldOffset: 4 +YAML: Name: name +YAML: Kind: LF_MEMBER +YAML: DataMember: +YAML: Access: Public +YAML: Type: 4146 +YAML: FieldOffset: 8 +YAML: Name: version +YAML: Kind: LF_MEMBER +YAML: DataMember: +YAML: Access: Public +YAML: Type: 4146 +YAML: FieldOffset: 12 +YAML: Name: uuid +YAML: Kind: LF_MEMBER +YAML: DataMember: +YAML: Access: Public +YAML: Type: 116 +YAML: FieldOffset: 16 +YAML: Name: lcid +YAML: Kind: LF_MEMBER +YAML: DataMember: +YAML: Access: Public +YAML: Type: 48 +YAML: FieldOffset: 20 +YAML: Name: control +YAML: Kind: LF_MEMBER +YAML: DataMember: +YAML: Access: Public +YAML: Type: 4146 +YAML: FieldOffset: 24 +YAML: Name: helpstring +YAML: Kind: LF_MEMBER +YAML: DataMember: +YAML: Access: Public +YAML: Type: 116 +YAML: FieldOffset: 28 +YAML: Name: helpstringcontext +YAML: Kind: LF_MEMBER +YAML: DataMember: +YAML: Access: Public +YAML: Type: 4146 +YAML: FieldOffset: 32 +YAML: Name: helpstringdll +YAML: Kind: LF_MEMBER +YAML: DataMember: +YAML: Access: Public +YAML: Type: 4146 +YAML: FieldOffset: 36 +YAML: Name: helpfile +YAML: Kind: LF_MEMBER +YAML: DataMember: +YAML: Access: Public +YAML: Type: 116 +YAML: FieldOffset: 40 +YAML: Name: helpcontext +YAML: Kind: LF_MEMBER +YAML: DataMember: +YAML: Access: Public +YAML: Type: 48 +YAML: FieldOffset: 44 +YAML: Name: hidden +YAML: Kind: LF_MEMBER +YAML: DataMember: +YAML: Access: Public +YAML: Type: 48 +YAML: FieldOffset: 45 +YAML: Name: restricted +YAML: Kind: LF_MEMBER +YAML: DataMember: +YAML: Access: Public +YAML: Type: 4146 +YAML: FieldOffset: 48 +YAML: Name: custom +YAML: Kind: LF_MEMBER +YAML: DataMember: +YAML: Access: Public +YAML: Type: 4146 +YAML: FieldOffset: 52 +YAML: Name: resource_name YAML: - Kind: LF_STRUCTURE YAML: Class: YAML: MemberCount: 19 @@ -768,156 +768,156 @@ YAML: VTableShape: 0 YAML: Size: 56 YAML: - Kind: LF_FIELDLIST YAML: FieldList: -YAML: - Kind: LF_ENUMERATE -YAML: Enumerator: -YAML: Access: Public -YAML: Value: 0 -YAML: Name: eAnyUsage -YAML: - Kind: LF_ENUMERATE -YAML: Enumerator: -YAML: Access: Public -YAML: Value: 1 -YAML: Name: eCoClassUsage -YAML: - Kind: LF_ENUMERATE -YAML: Enumerator: -YAML: Access: Public -YAML: Value: 2 -YAML: Name: eCOMInterfaceUsage -YAML: - Kind: LF_ENUMERATE -YAML: Enumerator: -YAML: Access: Public -YAML: Value: 6 -YAML: Name: eInterfaceUsage -YAML: - Kind: LF_ENUMERATE -YAML: Enumerator: -YAML: Access: Public -YAML: Value: 8 -YAML: Name: eMemberUsage -YAML: - Kind: LF_ENUMERATE -YAML: Enumerator: -YAML: Access: Public -YAML: Value: 16 -YAML: Name: eMethodUsage -YAML: - Kind: LF_ENUMERATE -YAML: Enumerator: -YAML: Access: Public -YAML: Value: 32 -YAML: Name: eInterfaceMethodUsage -YAML: - Kind: LF_ENUMERATE -YAML: Enumerator: -YAML: Access: Public -YAML: Value: 64 -YAML: Name: eInterfaceMemberUsage -YAML: - Kind: LF_ENUMERATE -YAML: Enumerator: -YAML: Access: Public -YAML: Value: 128 -YAML: Name: eCoClassMemberUsage -YAML: - Kind: LF_ENUMERATE -YAML: Enumerator: -YAML: Access: Public -YAML: Value: 256 -YAML: Name: eCoClassMethodUsage -YAML: - Kind: LF_ENUMERATE -YAML: Enumerator: -YAML: Access: Public -YAML: Value: 768 -YAML: Name: eGlobalMethodUsage -YAML: - Kind: LF_ENUMERATE -YAML: Enumerator: -YAML: Access: Public -YAML: Value: 1024 -YAML: Name: eGlobalDataUsage -YAML: - Kind: LF_ENUMERATE -YAML: Enumerator: -YAML: Access: Public -YAML: Value: 2048 -YAML: Name: eClassUsage -YAML: - Kind: LF_ENUMERATE -YAML: Enumerator: -YAML: Access: Public -YAML: Value: 4096 -YAML: Name: eInterfaceParameterUsage -YAML: - Kind: LF_ENUMERATE -YAML: Enumerator: -YAML: Access: Public -YAML: Value: 12288 -YAML: Name: eMethodParameterUsage -YAML: - Kind: LF_ENUMERATE -YAML: Enumerator: -YAML: Access: Public -YAML: Value: 16384 -YAML: Name: eIDLModuleUsage -YAML: - Kind: LF_ENUMERATE -YAML: Enumerator: -YAML: Access: Public -YAML: Value: -32768 -YAML: Name: eAnonymousUsage -YAML: - Kind: LF_ENUMERATE -YAML: Enumerator: -YAML: Access: Public -YAML: Value: 65536 -YAML: Name: eTypedefUsage -YAML: - Kind: LF_ENUMERATE -YAML: Enumerator: -YAML: Access: Public -YAML: Value: 131072 -YAML: Name: eUnionUsage -YAML: - Kind: LF_ENUMERATE -YAML: Enumerator: -YAML: Access: Public -YAML: Value: 262144 -YAML: Name: eEnumUsage -YAML: - Kind: LF_ENUMERATE -YAML: Enumerator: -YAML: Access: Public -YAML: Value: 524288 -YAML: Name: eDefineTagUsage -YAML: - Kind: LF_ENUMERATE -YAML: Enumerator: -YAML: Access: Public -YAML: Value: 1048576 -YAML: Name: eStructUsage -YAML: - Kind: LF_ENUMERATE -YAML: Enumerator: -YAML: Access: Public -YAML: Value: 2097152 -YAML: Name: eLocalUsage -YAML: - Kind: LF_ENUMERATE -YAML: Enumerator: -YAML: Access: Public -YAML: Value: 4194304 -YAML: Name: ePropertyUsage -YAML: - Kind: LF_ENUMERATE -YAML: Enumerator: -YAML: Access: Public -YAML: Value: 8388608 -YAML: Name: eEventUsage -YAML: - Kind: LF_ENUMERATE -YAML: Enumerator: -YAML: Access: Public -YAML: Value: 16777216 -YAML: Name: eTemplateUsage -YAML: - Kind: LF_ENUMERATE -YAML: Enumerator: -YAML: Access: Public -YAML: Value: 16777216 -YAML: Name: eModuleUsage -YAML: - Kind: LF_ENUMERATE -YAML: Enumerator: -YAML: Access: Public -YAML: Value: 33554432 -YAML: Name: eIllegalUsage -YAML: - Kind: LF_ENUMERATE -YAML: Enumerator: -YAML: Access: Public -YAML: Value: 67108864 -YAML: Name: eAsynchronousUsage -YAML: - Kind: LF_ENUMERATE -YAML: Enumerator: -YAML: Access: Public -YAML: Value: 4161535 -YAML: Name: eAnyIDLUsage +YAML: Kind: LF_ENUMERATE +YAML: Enumerator: +YAML: Access: Public +YAML: Value: 0 +YAML: Name: eAnyUsage +YAML: Kind: LF_ENUMERATE +YAML: Enumerator: +YAML: Access: Public +YAML: Value: 1 +YAML: Name: eCoClassUsage +YAML: Kind: LF_ENUMERATE +YAML: Enumerator: +YAML: Access: Public +YAML: Value: 2 +YAML: Name: eCOMInterfaceUsage +YAML: Kind: LF_ENUMERATE +YAML: Enumerator: +YAML: Access: Public +YAML: Value: 6 +YAML: Name: eInterfaceUsage +YAML: Kind: LF_ENUMERATE +YAML: Enumerator: +YAML: Access: Public +YAML: Value: 8 +YAML: Name: eMemberUsage +YAML: Kind: LF_ENUMERATE +YAML: Enumerator: +YAML: Access: Public +YAML: Value: 16 +YAML: Name: eMethodUsage +YAML: Kind: LF_ENUMERATE +YAML: Enumerator: +YAML: Access: Public +YAML: Value: 32 +YAML: Name: eInterfaceMethodUsage +YAML: Kind: LF_ENUMERATE +YAML: Enumerator: +YAML: Access: Public +YAML: Value: 64 +YAML: Name: eInterfaceMemberUsage +YAML: Kind: LF_ENUMERATE +YAML: Enumerator: +YAML: Access: Public +YAML: Value: 128 +YAML: Name: eCoClassMemberUsage +YAML: Kind: LF_ENUMERATE +YAML: Enumerator: +YAML: Access: Public +YAML: Value: 256 +YAML: Name: eCoClassMethodUsage +YAML: Kind: LF_ENUMERATE +YAML: Enumerator: +YAML: Access: Public +YAML: Value: 768 +YAML: Name: eGlobalMethodUsage +YAML: Kind: LF_ENUMERATE +YAML: Enumerator: +YAML: Access: Public +YAML: Value: 1024 +YAML: Name: eGlobalDataUsage +YAML: Kind: LF_ENUMERATE +YAML: Enumerator: +YAML: Access: Public +YAML: Value: 2048 +YAML: Name: eClassUsage +YAML: Kind: LF_ENUMERATE +YAML: Enumerator: +YAML: Access: Public +YAML: Value: 4096 +YAML: Name: eInterfaceParameterUsage +YAML: Kind: LF_ENUMERATE +YAML: Enumerator: +YAML: Access: Public +YAML: Value: 12288 +YAML: Name: eMethodParameterUsage +YAML: Kind: LF_ENUMERATE +YAML: Enumerator: +YAML: Access: Public +YAML: Value: 16384 +YAML: Name: eIDLModuleUsage +YAML: Kind: LF_ENUMERATE +YAML: Enumerator: +YAML: Access: Public +YAML: Value: -32768 +YAML: Name: eAnonymousUsage +YAML: Kind: LF_ENUMERATE +YAML: Enumerator: +YAML: Access: Public +YAML: Value: 65536 +YAML: Name: eTypedefUsage +YAML: Kind: LF_ENUMERATE +YAML: Enumerator: +YAML: Access: Public +YAML: Value: 131072 +YAML: Name: eUnionUsage +YAML: Kind: LF_ENUMERATE +YAML: Enumerator: +YAML: Access: Public +YAML: Value: 262144 +YAML: Name: eEnumUsage +YAML: Kind: LF_ENUMERATE +YAML: Enumerator: +YAML: Access: Public +YAML: Value: 524288 +YAML: Name: eDefineTagUsage +YAML: Kind: LF_ENUMERATE +YAML: Enumerator: +YAML: Access: Public +YAML: Value: 1048576 +YAML: Name: eStructUsage +YAML: Kind: LF_ENUMERATE +YAML: Enumerator: +YAML: Access: Public +YAML: Value: 2097152 +YAML: Name: eLocalUsage +YAML: Kind: LF_ENUMERATE +YAML: Enumerator: +YAML: Access: Public +YAML: Value: 4194304 +YAML: Name: ePropertyUsage +YAML: Kind: LF_ENUMERATE +YAML: Enumerator: +YAML: Access: Public +YAML: Value: 8388608 +YAML: Name: eEventUsage +YAML: Kind: LF_ENUMERATE +YAML: Enumerator: +YAML: Access: Public +YAML: Value: 16777216 +YAML: Name: eTemplateUsage +YAML: Kind: LF_ENUMERATE +YAML: Enumerator: +YAML: Access: Public +YAML: Value: 16777216 +YAML: Name: eModuleUsage +YAML: Kind: LF_ENUMERATE +YAML: Enumerator: +YAML: Access: Public +YAML: Value: 33554432 +YAML: Name: eIllegalUsage +YAML: Kind: LF_ENUMERATE +YAML: Enumerator: +YAML: Access: Public +YAML: Value: 67108864 +YAML: Name: eAsynchronousUsage +YAML: Kind: LF_ENUMERATE +YAML: Enumerator: +YAML: Access: Public +YAML: Value: 4161535 +YAML: Name: eAnyIDLUsage YAML: - Kind: LF_ENUM YAML: Enum: YAML: NumEnumerators: 30 @@ -960,24 +960,24 @@ YAML: ArgumentList: 4159 YAML: ThisPointerAdjustment: 0 YAML: - Kind: LF_FIELDLIST YAML: FieldList: -YAML: - Kind: LF_NESTTYPE -YAML: NestedType: -YAML: Type: 4156 -YAML: Name: usage_e -YAML: - Kind: LF_ONEMETHOD -YAML: OneMethod: -YAML: Type: 4160 -YAML: Kind: Vanilla -YAML: Options: [ None ] -YAML: Access: Public -YAML: VFTableOffset: -1 -YAML: Name: usageAttribute -YAML: - Kind: LF_MEMBER -YAML: DataMember: -YAML: Access: Public -YAML: Type: 117 -YAML: FieldOffset: 0 -YAML: Name: value +YAML: Kind: LF_NESTTYPE +YAML: NestedType: +YAML: Type: 4156 +YAML: Name: usage_e +YAML: Kind: LF_ONEMETHOD +YAML: OneMethod: +YAML: Type: 4160 +YAML: Kind: Vanilla +YAML: Options: [ None ] +YAML: Access: Public +YAML: VFTableOffset: -1 +YAML: Name: usageAttribute +YAML: Kind: LF_MEMBER +YAML: DataMember: +YAML: Access: Public +YAML: Type: 117 +YAML: FieldOffset: 0 +YAML: Name: value YAML: - Kind: LF_STRUCTURE YAML: Class: YAML: MemberCount: 3 @@ -992,26 +992,26 @@ YAML: VTableShape: 0 YAML: Size: 4 YAML: - Kind: LF_FIELDLIST YAML: FieldList: -YAML: - Kind: LF_ENUMERATE -YAML: Enumerator: -YAML: Access: Public -YAML: Value: 0 -YAML: Name: eBoolean -YAML: - Kind: LF_ENUMERATE -YAML: Enumerator: -YAML: Access: Public -YAML: Value: 1 -YAML: Name: eInteger -YAML: - Kind: LF_ENUMERATE -YAML: Enumerator: -YAML: Access: Public -YAML: Value: 2 -YAML: Name: eFloat -YAML: - Kind: LF_ENUMERATE -YAML: Enumerator: -YAML: Access: Public -YAML: Value: 3 -YAML: Name: eDouble +YAML: Kind: LF_ENUMERATE +YAML: Enumerator: +YAML: Access: Public +YAML: Value: 0 +YAML: Name: eBoolean +YAML: Kind: LF_ENUMERATE +YAML: Enumerator: +YAML: Access: Public +YAML: Value: 1 +YAML: Name: eInteger +YAML: Kind: LF_ENUMERATE +YAML: Enumerator: +YAML: Access: Public +YAML: Value: 2 +YAML: Name: eFloat +YAML: Kind: LF_ENUMERATE +YAML: Enumerator: +YAML: Access: Public +YAML: Value: 3 +YAML: Name: eDouble YAML: - Kind: LF_ENUM YAML: Enum: YAML: NumEnumerators: 4 @@ -1054,24 +1054,24 @@ YAML: ArgumentList: 4167 YAML: ThisPointerAdjustment: 0 YAML: - Kind: LF_FIELDLIST YAML: FieldList: -YAML: - Kind: LF_NESTTYPE -YAML: NestedType: -YAML: Type: 4164 -YAML: Name: type_e -YAML: - Kind: LF_ONEMETHOD -YAML: OneMethod: -YAML: Type: 4168 -YAML: Kind: Vanilla -YAML: Options: [ None ] -YAML: Access: Public -YAML: VFTableOffset: -1 -YAML: Name: v1_alttypeAttribute -YAML: - Kind: LF_MEMBER -YAML: DataMember: -YAML: Access: Public -YAML: Type: 4164 -YAML: FieldOffset: 0 -YAML: Name: type +YAML: Kind: LF_NESTTYPE +YAML: NestedType: +YAML: Type: 4164 +YAML: Name: type_e +YAML: Kind: LF_ONEMETHOD +YAML: OneMethod: +YAML: Type: 4168 +YAML: Kind: Vanilla +YAML: Options: [ None ] +YAML: Access: Public +YAML: VFTableOffset: -1 +YAML: Name: v1_alttypeAttribute +YAML: Kind: LF_MEMBER +YAML: DataMember: +YAML: Access: Public +YAML: Type: 4164 +YAML: FieldOffset: 0 +YAML: Name: type YAML: - Kind: LF_STRUCTURE YAML: Class: YAML: MemberCount: 3 diff --git a/tools/llvm-pdbdump/CodeViewYaml.cpp b/tools/llvm-pdbdump/CodeViewYaml.cpp index e9dcade43ec..e75f454b34a 100644 --- a/tools/llvm-pdbdump/CodeViewYaml.cpp +++ b/tools/llvm-pdbdump/CodeViewYaml.cpp @@ -8,7 +8,6 @@ //===----------------------------------------------------------------------===// #include "CodeViewYaml.h" -#include "PdbYaml.h" #include "llvm/DebugInfo/CodeView/CVTypeVisitor.h" #include "llvm/DebugInfo/CodeView/EnumTables.h" @@ -26,38 +25,6 @@ LLVM_YAML_IS_SEQUENCE_VECTOR(OneMethodRecord) LLVM_YAML_IS_SEQUENCE_VECTOR(VFTableSlotKind) LLVM_YAML_IS_SEQUENCE_VECTOR(StringRef) LLVM_YAML_IS_SEQUENCE_VECTOR(CVType) -LLVM_YAML_IS_SEQUENCE_VECTOR(llvm::pdb::yaml::PdbTpiRecord) - -namespace { -struct FieldListRecordSplitter : public TypeVisitorCallbacks { -public: - explicit FieldListRecordSplitter( - std::vector &Records) - : Records(Records) {} - -#define TYPE_RECORD(EnumName, EnumVal, Name) -#define TYPE_RECORD_ALIAS(EnumName, EnumVal, Name, AliasName) -#define MEMBER_RECORD_ALIAS(EnumName, EnumVal, Name, AliasName) -#define MEMBER_RECORD(EnumName, EnumVal, Name) \ - Error visitKnownRecord(const CVType &CVT, Name##Record &Record) override { \ - visitKnownRecordImpl(CVT); \ - return Error::success(); \ - } -#include "llvm/DebugInfo/CodeView/TypeRecords.def" - -private: - void visitKnownRecordImpl(const CVType &CVT) { - llvm::pdb::yaml::PdbTpiRecord R; - R.Record = CVT; - R.RecordData.assign(CVT.RawData.begin(), CVT.RawData.end()); - R.Record.Data = R.RecordData; - R.Record.RawData = R.RecordData; - Records.push_back(std::move(R)); - } - - std::vector &Records; -}; -} namespace llvm { namespace yaml { @@ -551,15 +518,3 @@ llvm::codeview::yaml::YamlTypeDumperCallbacks::visitTypeBegin( YamlIO.mapRequired("Kind", K); return K; } - -void llvm::codeview::yaml::YamlTypeDumperCallbacks::visitKnownRecordImpl( - const char *Name, const CVType &Type, FieldListRecord &FieldList) { - - std::vector Records; - if (YamlIO.outputting()) { - FieldListRecordSplitter Splitter(Records); - CVTypeVisitor V(Splitter); - consumeError(V.visitFieldListMemberStream(FieldList.Data)); - } - YamlIO.mapRequired(Name, Records); -} diff --git a/tools/llvm-pdbdump/CodeViewYaml.h b/tools/llvm-pdbdump/CodeViewYaml.h index ccf7e406b4f..8932d008ca3 100644 --- a/tools/llvm-pdbdump/CodeViewYaml.h +++ b/tools/llvm-pdbdump/CodeViewYaml.h @@ -27,7 +27,7 @@ public: #define TYPE_RECORD(EnumName, EnumVal, Name) \ Error visitKnownRecord(const CVRecord &CVR, \ Name##Record &Record) override { \ - visitKnownRecordImpl(#Name, CVR, Record); \ + YamlIO.mapRequired(#Name, Record); \ return Error::success(); \ } #define MEMBER_RECORD(EnumName, EnumVal, Name) \ @@ -37,14 +37,6 @@ public: #include "llvm/DebugInfo/CodeView/TypeRecords.def" private: - template - void visitKnownRecordImpl(const char *Name, const CVType &Type, T &Record) { - YamlIO.mapRequired(Name, Record); - } - - void visitKnownRecordImpl(const char *Name, const CVType &Type, - FieldListRecord &FieldList); - llvm::yaml::IO &YamlIO; }; }