[lld] r308234 - [codeview] Fix YAML for LF_TYPESERVER2 by hoisting PDB_UniqueId
Reid Kleckner via llvm-commits
llvm-commits at lists.llvm.org
Mon Jul 17 16:59:44 PDT 2017
Author: rnk
Date: Mon Jul 17 16:59:44 2017
New Revision: 308234
URL: http://llvm.org/viewvc/llvm-project?rev=308234&view=rev
Log:
[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
Modified:
lld/trunk/COFF/PDB.cpp
lld/trunk/test/COFF/pdb-type-server-missing.yaml
Modified: lld/trunk/COFF/PDB.cpp
URL: http://llvm.org/viewvc/llvm-project/lld/trunk/COFF/PDB.cpp?rev=308234&r1=308233&r2=308234&view=diff
==============================================================================
--- lld/trunk/COFF/PDB.cpp (original)
+++ lld/trunk/COFF/PDB.cpp Mon Jul 17 16:59:44 2017
@@ -507,7 +507,7 @@ void PDBLinker::initialize(const llvm::c
auto &InfoBuilder = Builder.getInfoBuilder();
InfoBuilder.setAge(DI ? DI->PDB70.Age : 0);
- pdb::PDB_UniqueId uuid{};
+ GUID uuid{};
if (DI)
memcpy(&uuid, &DI->PDB70.Signature, sizeof(uuid));
InfoBuilder.setGuid(uuid);
Modified: lld/trunk/test/COFF/pdb-type-server-missing.yaml
URL: http://llvm.org/viewvc/llvm-project/lld/trunk/test/COFF/pdb-type-server-missing.yaml?rev=308234&r1=308233&r2=308234&view=diff
==============================================================================
--- lld/trunk/test/COFF/pdb-type-server-missing.yaml (original)
+++ lld/trunk/test/COFF/pdb-type-server-missing.yaml Mon Jul 17 16:59:44 2017
@@ -82,7 +82,7 @@ sections:
Types:
- Kind: LF_TYPESERVER2
TypeServer2:
- Guid: ' ? "?kB??RX?2??' # FIXME: yaml-ize this as hex.
+ Guid: '{01DF191B-22BF-6B42-96CE-5258B8329FE5}'
Age: 18
Name: 'C:\src\llvm-project\build\definitely_not_found_for_sure.pdb'
- Name: '.text$mn'
More information about the llvm-commits
mailing list