33 std::unique_ptr<MappedBlockStream> Stream)
42 if (
Error E = reloadSerialize(Reader))
47 "Unexpected bytes in module stream.");
56 if (C11Size > 0 && C13Size > 0)
58 "Module has both C11 and C13 line info");
73 if (
auto EC = SymbolReader.readArray(
74 SymbolArray, SymbolReader.bytesRemaining(),
sizeof(
uint32_t)))
78 if (
auto EC = SubsectionsReader.readArray(Subsections,
79 SubsectionsReader.bytesRemaining()))
85 if (
auto EC = Reader.
readSubstream(GlobalRefsSubstream, GlobalRefsSize))
96 return SymbolsSubstream;
100 return C11LinesSubstream;
104 return C13LinesSubstream;
108 return GlobalRefsSubstream;
128 return !C13LinesSubstream.
empty();
137 if (SS.kind() != DebugSubsectionKind::FileChecksums)
140 if (
auto EC = Result.initialize(SS.getRecordData()))
141 return std::move(
EC);
Lightweight arrays that are backed by an arbitrary BinaryStream.
if(auto Err=PB.parsePassPipeline(MPM, Passes)) return wrap(std MPM run * Mod
assert(ImpDefSCC.getReg()==AMDGPU::SCC &&ImpDefSCC.isDef())
Provides read only access to a subclass of BinaryStream.
Error readSubstream(BinarySubstreamRef &Ref, uint32_t Length)
Read Length bytes from the underlying stream into Ref.
Error readInteger(T &Dest)
Read an integer of the specified endianness into Dest and update the stream's offset.
uint64_t bytesRemaining() const
void setOffset(uint64_t Off)
BinaryStreamRef is to BinaryStream what ArrayRef is to an Array.
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.
A Module instance is used to store all the information related to an LLVM module.
Iterator at(uint32_t Offset) const
given an offset into the array's underlying stream, return an iterator to the record at that offset.
Iterator begin(bool *HadError=nullptr) const
CVRecord is a fat pointer (base + size pair) to a symbol or type record.
A range adaptor for a pair of iterators.
uint32_t getSymbolDebugInfoByteSize() const
uint32_t getC13LineInfoByteSize() const
uint16_t getModuleStreamIndex() const
uint32_t getC11LineInfoByteSize() const
iterator_range< codeview::CVSymbolArray::Iterator > symbols(bool *HadError) const
codeview::CVSymbol readSymbolAtOffset(uint32_t Offset) const
bool hasDebugSubsections() const
BinarySubstreamRef getSymbolsSubstream() const
BinarySubstreamRef getGlobalRefsSubstream() const
Expected< codeview::DebugChecksumsSubsectionRef > findChecksumsSubsection() const
ModuleDebugStreamRef(const DbiModuleDescriptor &Module, std::unique_ptr< msf::MappedBlockStream > Stream)
BinarySubstreamRef getC11LinesSubstream() const
BinarySubstreamRef getC13LinesSubstream() const
const codeview::CVSymbolArray getSymbolArrayForScope(uint32_t ScopeBegin) const
iterator_range< DebugSubsectionIterator > subsections() const
This provides a very simple, boring adaptor for a begin and end iterator into a range type.
CVSymbolArray limitSymbolArrayToScope(const CVSymbolArray &Symbols, uint32_t ScopeBegin)
const uint16_t kInvalidStreamIndex
This is an optimization pass for GlobalISel generic memory operations.
iterator_range< T > make_range(T x, T y)
Convenience function for iterating over sub-ranges.
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.
BinaryStreamRef StreamData