[PDB] Defer writing the build id until the rest of the PDB is written.
For now this is NFC, but this small refactor opens the door to
letting us embed a hash of the PDB in the build id field of the
PDB.
Differential Revision: https://reviews.llvm.org/D43913
llvm-svn: 326453
diff --git a/lld/COFF/PDB.cpp b/lld/COFF/PDB.cpp
index 60e69c1..de6aa64 100644
--- a/lld/COFF/PDB.cpp
+++ b/lld/COFF/PDB.cpp
@@ -1056,12 +1056,10 @@
// Add an Info stream.
auto &InfoBuilder = Builder.getInfoBuilder();
- InfoBuilder.setAge(BuildId.PDB70.Age);
-
GUID uuid;
memcpy(&uuid, &BuildId.PDB70.Signature, sizeof(uuid));
+ InfoBuilder.setAge(BuildId.PDB70.Age);
InfoBuilder.setGuid(uuid);
- InfoBuilder.setSignature(time(nullptr));
InfoBuilder.setVersion(pdb::PdbRaw_ImplVer::PdbImplVC70);
// Add an empty DBI stream.