21 : Stream(
std::
move(Stream)), Header(nullptr) {}
30 "PDB Stream does not contain a header."));
40 "Unsupported PDB stream version.");
44 if (
auto EC = NamedStreams.
load(Reader))
47 NamedStreamMapByteSize = NewOffset -
Offset;
50 if (
auto EC = Reader.
readSubstream(SubNamedStreams, NamedStreamMapByteSize))
54 while (!Stop && !Reader.
empty()) {
79 FeatureSignatures.push_back(Sig);
88 if (!NamedStreams.
get(
Name, Result))
114 return NamedStreamMapByteSize;
120 return FeatureSignatures;
128 return SubNamedStreams;
ArrayRef - Represent a constant reference to an array (0 or more elements consecutively in memory),...
Provides read only access to a subclass of BinaryStream.
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...
Error readSubstream(BinarySubstreamRef &Ref, uint32_t Length)
Read Length bytes from the underlying stream into Ref.
Error readEnum(T &Dest)
Similar to readInteger.
uint64_t getOffset() const
void setOffset(uint64_t Off)
Lightweight error class with error context and mandatory checking.
static ErrorSuccess success()
Create a success value.
Tagged union holding either a T or a Error.
StringMap - This is an unconventional map that is specialized for handling keys that are "strings",...
StringRef - Represent a constant reference to a string, i.e.
codeview::GUID getGuid() const
Expected< uint32_t > getNamedStreamIndex(llvm::StringRef Name) const
ArrayRef< PdbRaw_FeatureSig > getFeatureSignatures() const
uint32_t getStreamSize() const
const NamedStreamMap & getNamedStreams() const
InfoStream(std::unique_ptr< BinaryStream > Stream)
PdbRaw_Features getFeatures() const
bool containsIdStream() const
StringMap< uint32_t > named_streams() const
uint32_t getNamedStreamMapByteSize() const
PdbRaw_ImplVer getVersion() const
uint32_t getSignature() const
BinarySubstreamRef getNamedStreamsBuffer() const
Error load(BinaryStreamReader &Stream)
StringMap< uint32_t > entries() const
bool get(StringRef Stream, uint32_t &StreamNo) const
@ PdbFeatureMinimalDebugInfo
@ PdbFeatureNoTypeMerging
@ PdbFeatureContainsIdStream
This is an optimization pass for GlobalISel generic memory operations.
Error joinErrors(Error E1, Error E2)
Concatenate errors.
OutputIt move(R &&Range, OutputIt Out)
Provide wrappers to std::move which take ranges instead of having to pass begin/end explicitly.
Implement std::hash so that hash_code can be used in STL containers.
This represents the 'GUID' type from windows.h.