[llvm] r330145 - Resubmit "Fix some incorrect fields in our generated PDBs."
Zachary Turner via llvm-commits
llvm-commits at lists.llvm.org
Mon Apr 16 11:17:13 PDT 2018
Author: zturner
Date: Mon Apr 16 11:17:13 2018
New Revision: 330145
URL: http://llvm.org/viewvc/llvm-project?rev=330145&view=rev
Log:
Resubmit "Fix some incorrect fields in our generated PDBs."
This fixes the failing tests. They simply hadn't been updated
to match the new output resulting from this patch.
Modified:
llvm/trunk/include/llvm/DebugInfo/PDB/Native/DbiStreamBuilder.h
llvm/trunk/lib/DebugInfo/PDB/Native/DbiStreamBuilder.cpp
Modified: llvm/trunk/include/llvm/DebugInfo/PDB/Native/DbiStreamBuilder.h
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/include/llvm/DebugInfo/PDB/Native/DbiStreamBuilder.h?rev=330145&r1=330144&r2=330145&view=diff
==============================================================================
--- llvm/trunk/include/llvm/DebugInfo/PDB/Native/DbiStreamBuilder.h (original)
+++ llvm/trunk/include/llvm/DebugInfo/PDB/Native/DbiStreamBuilder.h Mon Apr 16 11:17:13 2018
@@ -46,6 +46,7 @@ public:
void setVersionHeader(PdbRaw_DbiVer V);
void setAge(uint32_t A);
void setBuildNumber(uint16_t B);
+ void setBuildNumber(uint8_t Major, uint8_t Minor);
void setPdbDllVersion(uint16_t V);
void setPdbDllRbld(uint16_t R);
void setFlags(uint16_t F);
Modified: llvm/trunk/lib/DebugInfo/PDB/Native/DbiStreamBuilder.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/DebugInfo/PDB/Native/DbiStreamBuilder.cpp?rev=330145&r1=330144&r2=330145&view=diff
==============================================================================
--- llvm/trunk/lib/DebugInfo/PDB/Native/DbiStreamBuilder.cpp (original)
+++ llvm/trunk/lib/DebugInfo/PDB/Native/DbiStreamBuilder.cpp Mon Apr 16 11:17:13 2018
@@ -37,6 +37,14 @@ void DbiStreamBuilder::setAge(uint32_t A
void DbiStreamBuilder::setBuildNumber(uint16_t B) { BuildNumber = B; }
+void DbiStreamBuilder::setBuildNumber(uint8_t Major, uint8_t Minor) {
+ BuildNumber = (uint16_t(Major) << DbiBuildNo::BuildMajorShift) &
+ DbiBuildNo::BuildMajorMask;
+ BuildNumber |= (uint16_t(Minor) << DbiBuildNo::BuildMinorShift) &
+ DbiBuildNo::BuildMinorMask;
+ BuildNumber |= DbiBuildNo::NewVersionFormatMask;
+}
+
void DbiStreamBuilder::setPdbDllVersion(uint16_t V) { PdbDllVersion = V; }
void DbiStreamBuilder::setPdbDllRbld(uint16_t R) { PdbDllRbld = R; }
@@ -251,7 +259,7 @@ Error DbiStreamBuilder::finalize() {
H->TypeServerSize = 0;
H->SymRecordStreamIndex = SymRecordStreamIndex;
H->PublicSymbolStreamIndex = PublicsStreamIndex;
- H->MFCTypeServerIndex = kInvalidStreamIndex;
+ H->MFCTypeServerIndex = 0; // Not sure what this is, but link.exe writes 0.
H->GlobalSymbolStreamIndex = GlobalsStreamIndex;
Header = H;
More information about the llvm-commits
mailing list