40 using namespace llvm::msf;
41 using namespace llvm::support;
42 using namespace llvm::pdb;
45 std::unique_ptr<MappedBlockStream> Stream)
46 : Pdb(File), Stream(std::move(Stream)) {}
65 "Publics Stream does not contain a header.");
70 "Publics Stream does not contain a header.");
80 NumBuckets = HashBuckets.
size();
84 if (
auto EC = Reader.
readArray(AddressMap, NumAddressMapEntries))
87 "Could not read an address map."));
93 "Could not read a thunk map."));
100 "Could not read a section map."));
104 return make_error<RawError>(raw_error_code::corrupt_file,
105 "Corrupted publics stream.");
112 if (SymbolS.takeError()) {
125 return SymbolS.takeError();
127 return SymbolS->getSymbolArray();
iterator_range< codeview::CVSymbolArray::Iterator > getSymbols(bool *HadError) const
Expected< const codeview::CVSymbolArray & > getSymbolArray() const
This provides a very simple, boring adaptor for a begin and end iterator into a range type...
Error readObject(const T *&Dest)
Get a pointer to an object of type T from the underlying stream, as if by memcpy, and store the resul...
Tagged union holding either a T or a Error.
Error readGSIHashRecords(FixedStreamArray< PSHashRecord > &HashRecords, const GSIHashHeader *HashHdr, BinaryStreamReader &Reader)
uint32_t bytesRemaining() const
Expected< SymbolStream & > getPDBSymbolStream()
Error readGSIHashBuckets(FixedStreamArray< support::ulittle32_t > &HashBuckets, const GSIHashHeader *HashHdr, BinaryStreamReader &Reader)
uint32_t getSymHash() const
iterator_range< T > make_range(T x, T y)
Convenience function for iterating over sub-ranges.
static ErrorSuccess success()
Create a success value.
VarStreamArray represents an array of variable length records backed by a stream. ...
A range adaptor for a pair of iterators.
iterator_range< codeview::CVSymbolArray::Iterator > getSymbols(bool *HadError) const
Error joinErrors(Error E1, Error E2)
Concatenate errors.
uint32_t getAddrMap() const
Lightweight error class with error context and mandatory checking.
Provides read only access to a subclass of BinaryStream.
Error readGSIHashHeader(const GSIHashHeader *&HashHdr, BinaryStreamReader &Reader)
Error readArray(ArrayRef< T > &Array, uint32_t NumElements)
Get a reference to a NumElements element array of objects of type T from the underlying stream as if ...