23 InfoStream::InfoStream(std::unique_ptr<BinaryStream> Stream)
24 : Stream(
std::move(Stream)), Header(nullptr) {}
33 "PDB Stream does not contain a header."));
43 "Unsupported PDB stream version.");
47 if (
auto EC = NamedStreams.
load(Reader))
50 NamedStreamMapByteSize = NewOffset -
Offset;
53 if (
auto EC = Reader.
readSubstream(SubNamedStreams, NamedStreamMapByteSize))
57 while (!Stop && !Reader.
empty()) {
82 FeatureSignatures.push_back(Sig);
91 if (!NamedStreams.
get(Name, Result))
117 return NamedStreamMapByteSize;
123 return FeatureSignatures;
131 return SubNamedStreams;
Error readSubstream(BinarySubstreamRef &Stream, uint32_t Size)
Read Length bytes from the underlying stream into Stream.
This class represents lattice values for constants.
BinarySubstreamRef getNamedStreamsBuffer() const
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...
StringMap< uint32_t > named_streams() const
PdbRaw_Features getFeatures() const
amdgpu Simplify well known AMD library false Value Value const Twine & Name
uint32_t getStreamSize() const
This represents the 'GUID' type from windows.h.
Tagged union holding either a T or a Error.
uint32_t getOffset() const
ArrayRef - Represent a constant reference to an array (0 or more elements consecutively in memory)...
ArrayRef< PdbRaw_FeatureSig > getFeatureSignatures() const
Error load(BinaryStreamReader &Stream)
StringMap< uint32_t > entries() const
PdbRaw_ImplVer getVersion() const
uint32_t getSignature() const
void setOffset(uint32_t Off)
static ErrorSuccess success()
Create a success value.
Error joinErrors(Error E1, Error E2)
Concatenate errors.
codeview::GUID getGuid() const
Expected< uint32_t > getNamedStreamIndex(llvm::StringRef Name) const
bool get(StringRef Stream, uint32_t &StreamNo) const
const NamedStreamMap & getNamedStreams() const
Lightweight error class with error context and mandatory checking.
bool containsIdStream() const
Provides read only access to a subclass of BinaryStream.
StringRef - Represent a constant reference to a string, i.e.
Error readEnum(T &Dest)
Similar to readInteger.
uint32_t getNamedStreamMapByteSize() const