summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorNico Weber <nicolasweber@gmx.de>2018-09-11 14:11:52 +0000
committerNico Weber <nicolasweber@gmx.de>2018-09-11 14:11:52 +0000
commite2745b5d86747073e0772b16654e951a14825cfd (patch)
tree0619d88edc9eb5a54851f47c10e03eed89742092
parentf48e961d23c7854b7c14589e851542357724fc0f (diff)
downloadbcm5719-llvm-e2745b5d86747073e0772b16654e951a14825cfd.tar.gz
bcm5719-llvm-e2745b5d86747073e0772b16654e951a14825cfd.zip
pdb output: Initialize padding in PublicsStreamHeader.
Makes the produced pdbs more deterministic; before they'd contain 2 arbitary bytes where this padding was. Also reorder initialization to match the order of the fields in the struct (nfc) llvm-svn: 341945
-rw-r--r--llvm/lib/DebugInfo/PDB/Native/GSIStreamBuilder.cpp5
1 files changed, 3 insertions, 2 deletions
diff --git a/llvm/lib/DebugInfo/PDB/Native/GSIStreamBuilder.cpp b/llvm/lib/DebugInfo/PDB/Native/GSIStreamBuilder.cpp
index 58efc2256ae..19efae6fc55 100644
--- a/llvm/lib/DebugInfo/PDB/Native/GSIStreamBuilder.cpp
+++ b/llvm/lib/DebugInfo/PDB/Native/GSIStreamBuilder.cpp
@@ -310,13 +310,14 @@ Error GSIStreamBuilder::commitPublicsHashStream(
PublicsStreamHeader Header;
// FIXME: Fill these in. They are for incremental linking.
+ Header.SymHash = PSH->calculateSerializedLength();
+ Header.AddrMap = PSH->Records.size() * 4;
Header.NumThunks = 0;
Header.SizeOfThunk = 0;
Header.ISectThunkTable = 0;
+ memset(Header.Padding, 0, sizeof(Header.Padding));
Header.OffThunkTable = 0;
Header.NumSections = 0;
- Header.SymHash = PSH->calculateSerializedLength();
- Header.AddrMap = PSH->Records.size() * 4;
if (auto EC = Writer.writeObject(Header))
return EC;
OpenPOWER on IntegriCloud