21 using namespace llvm::codeview;
22 using namespace llvm::msf;
23 using namespace llvm::pdb;
25 InfoStream::InfoStream(std::unique_ptr<MappedBlockStream> Stream)
26 : Stream(std::move(Stream)) {}
36 "PDB Stream does not contain a header."));
46 "Unsupported PDB stream version.");
55 if (
auto EC = NamedStreams.
load(Reader))
58 NamedStreamMapByteSize = NewOffset -
Offset;
61 if (
auto EC = Reader.
readSubstream(SubNamedStreams, NamedStreamMapByteSize))
65 while (!Stop && !Reader.
empty()) {
90 FeatureSignatures.push_back(Sig);
99 if (!NamedStreams.
get(Name, Result))
124 return NamedStreamMapByteSize;
130 return FeatureSignatures;
138 return SubNamedStreams;
BinarySubstreamRef getNamedStreamsBuffer() const
Error readSubstream(BinarySubstreamRef &Stream, uint32_t Size)
Read Length bytes from the underlying stream into Stream.
ArrayRef< PdbRaw_FeatureSig > getFeatureSignatures() 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...
const NamedStreamMap & getNamedStreams() const
bool containsIdStream() const
uint32_t getOffset() const
This represents the 'GUID' type from windows.h.
uint32_t getSignature() const
ArrayRef - Represent a constant reference to an array (0 or more elements consecutively in memory)...
Error load(BinaryStreamReader &Stream)
iterator_range< StringMapConstIterator< uint32_t > > named_streams() const
uint32_t getStreamSize() const
PdbRaw_Features getFeatures() const
iterator_range< StringMapConstIterator< uint32_t > > entries() const
PdbRaw_ImplVer getVersion() const
void setOffset(uint32_t Off)
static ErrorSuccess success()
Create a success value.
codeview::GUID getGuid() const
A range adaptor for a pair of iterators.
Error joinErrors(Error E1, Error E2)
Concatenate errors.
#define LLVM_FALLTHROUGH
LLVM_FALLTHROUGH - Mark fallthrough cases in switch statements.
Lightweight error class with error context and mandatory checking.
bool get(StringRef Stream, uint32_t &StreamNo) 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 getNamedStreamIndex(llvm::StringRef Name) const
uint32_t getNamedStreamMapByteSize() const