Files
archived-llvm/test/ObjectYAML/CodeView/guid.yaml
Reid Kleckner 5c238d611e [codeview] Fix YAML for LF_TYPESERVER2 by hoisting PDB_UniqueId
Summary:
We were treating the GUIDs in TypeServer2Record as strings, and the
non-ASCII bytes in the GUID would not round-trip through YAML.

We already had the PDB_UniqueId type portably represent a Windows GUID,
but we need to hoist that up to the DebugInfo/CodeView library so that
we can use it in the TypeServer2Record as well as in PDB parsing code.

Reviewers: inglorion, amccarth

Subscribers: llvm-commits, hiraditya

Differential Revision: https://reviews.llvm.org/D35495

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@308234 91177308-0d34-0410-b5e6-96231b3b80d8
2017-07-17 23:59:44 +00:00

60 lines
2.0 KiB
YAML

# RUN: yaml2obj %s | obj2yaml | FileCheck %s
--- !COFF
header:
Machine: IMAGE_FILE_MACHINE_AMD64
Characteristics: [ ]
sections:
- Name: '.debug$T'
Characteristics: [ IMAGE_SCN_CNT_INITIALIZED_DATA, IMAGE_SCN_MEM_DISCARDABLE, IMAGE_SCN_MEM_READ ]
Alignment: 1
Types:
- Kind: LF_TYPESERVER2
TypeServer2:
Guid: '{01DF191B-22BF-6B42-96CE-5258B8329FE5}'
Age: 24
Name: 'C:\src\llvm-project\build\vc140.pdb'
symbols:
- Name: '.debug$T'
Value: 0
SectionNumber: 1
SimpleType: IMAGE_SYM_TYPE_NULL
ComplexType: IMAGE_SYM_DTYPE_NULL
StorageClass: IMAGE_SYM_CLASS_STATIC
SectionDefinition:
Length: 64
NumberOfRelocations: 0
NumberOfLinenumbers: 0
CheckSum: 0
Number: 0
...
# CHECK: --- !COFF
# CHECK: header:
# CHECK: Machine: IMAGE_FILE_MACHINE_AMD64
# CHECK: Characteristics: [ ]
# CHECK: sections:
# CHECK: - Name: '.debug$T'
# CHECK: Characteristics: [ IMAGE_SCN_CNT_INITIALIZED_DATA, IMAGE_SCN_MEM_DISCARDABLE, IMAGE_SCN_MEM_READ ]
# CHECK: Alignment: 1
# CHECK: Types:
# CHECK: - Kind: LF_TYPESERVER2
# CHECK: TypeServer2:
# CHECK: Guid: '{01DF191B-22BF-6B42-96CE-5258B8329FE5}'
# CHECK: Age: 24
# CHECK: Name: 'C:\src\llvm-project\build\vc140.pdb'
# CHECK: symbols:
# CHECK: - Name: '.debug$T'
# CHECK: Value: 0
# CHECK: SectionNumber: 1
# CHECK: SimpleType: IMAGE_SYM_TYPE_NULL
# CHECK: ComplexType: IMAGE_SYM_DTYPE_NULL
# CHECK: StorageClass: IMAGE_SYM_CLASS_STATIC
# CHECK: SectionDefinition:
# CHECK: Length: 64
# CHECK: NumberOfRelocations: 0
# CHECK: NumberOfLinenumbers: 0
# CHECK: CheckSum: 0
# CHECK: Number: 0
# CHECK: ...