OSDN Git Service

[codeview] YAMLize all section offsets and indices in symbol records
authorReid Kleckner <rnk@google.com>
Tue, 20 Jun 2017 21:19:22 +0000 (21:19 +0000)
committerReid Kleckner <rnk@google.com>
Tue, 20 Jun 2017 21:19:22 +0000 (21:19 +0000)
commit09ff5f277b141d91cc09664fc8cbc23019d221d9
tree63af8d713343414cbda9947b1664fd39cd1c8977
parentc843d3c027aa5cab01ba83aaf83627fd576f6a87
[codeview] YAMLize all section offsets and indices in symbol records

We forgot to serialize these because llvm-readobj didn't dump them. They
are typically all zeros in an object file. The linker fills them in with
relocations before adding them to the PDB. Now we can properly round
trip these symbols through pdb2yaml -> yaml2pdb.

I made these fields optional with a zero default so that we can elide
them from our test cases.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@305857 91177308-0d34-0410-b5e6-96231b3b80d8
lib/ObjectYAML/CodeViewYAMLSymbols.cpp
test/DebugInfo/COFF/globals.ll
test/DebugInfo/PDB/pdb-yaml-symbols.test