summaryrefslogtreecommitdiffstats
path: root/llvm/lib/DebugInfo/PDB/Native/PublicsStream.cpp
diff options
context:
space:
mode:
authorZachary Turner <zturner@google.com>2017-07-10 22:40:20 +0000
committerZachary Turner <zturner@google.com>2017-07-10 22:40:20 +0000
commit7eaf1d96ad9a90d077e5cb0b299fe132ac793868 (patch)
treefda6d610373f5fff1032f4a377911e610aa803b8 /llvm/lib/DebugInfo/PDB/Native/PublicsStream.cpp
parent7466ccfc599dda78925af75580339827863effca (diff)
downloadbcm5719-llvm-7eaf1d96ad9a90d077e5cb0b299fe132ac793868.tar.gz
bcm5719-llvm-7eaf1d96ad9a90d077e5cb0b299fe132ac793868.zip
[lld/pdb] Create an empty public symbol record stream.
This is part of the continuing effort to increase parity between LLD and MSVC PDBs. link still doesn't like our PDBs, so the most obvious thing to check was whether adding an empty publics stream would get it to do something else. It still fails in the same way but at least this removes one more variable from the equation. The next logical step would be to try creating an empty globals stream. Differential Revision: https://reviews.llvm.org/D35224 llvm-svn: 307598
Diffstat (limited to 'llvm/lib/DebugInfo/PDB/Native/PublicsStream.cpp')
-rw-r--r--llvm/lib/DebugInfo/PDB/Native/PublicsStream.cpp16
1 files changed, 2 insertions, 14 deletions
diff --git a/llvm/lib/DebugInfo/PDB/Native/PublicsStream.cpp b/llvm/lib/DebugInfo/PDB/Native/PublicsStream.cpp
index 8f3474b9ce1..9c3e654f808 100644
--- a/llvm/lib/DebugInfo/PDB/Native/PublicsStream.cpp
+++ b/llvm/lib/DebugInfo/PDB/Native/PublicsStream.cpp
@@ -41,19 +41,6 @@ using namespace llvm::msf;
using namespace llvm::support;
using namespace llvm::pdb;
-// This is PSGSIHDR struct defined in
-// https://github.com/Microsoft/microsoft-pdb/blob/master/PDB/dbi/gsi.h
-struct PublicsStream::HeaderInfo {
- ulittle32_t SymHash;
- ulittle32_t AddrMap;
- ulittle32_t NumThunks;
- ulittle32_t SizeOfThunk;
- ulittle16_t ISectThunkTable;
- char Padding[2];
- ulittle32_t OffThunkTable;
- ulittle32_t NumSections;
-};
-
PublicsStream::PublicsStream(PDBFile &File,
std::unique_ptr<MappedBlockStream> Stream)
: Pdb(File), Stream(std::move(Stream)) {}
@@ -72,7 +59,8 @@ Error PublicsStream::reload() {
BinaryStreamReader Reader(*Stream);
// Check stream size.
- if (Reader.bytesRemaining() < sizeof(HeaderInfo) + sizeof(GSIHashHeader))
+ if (Reader.bytesRemaining() <
+ sizeof(PublicsStreamHeader) + sizeof(GSIHashHeader))
return make_error<RawError>(raw_error_code::corrupt_file,
"Publics Stream does not contain a header.");
OpenPOWER on IntegriCloud