Go to the documentation of this file.
31 ModuleDebugStreamRef::ModuleDebugStreamRef(
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");
65 if (
auto EC = Reader.
readSubstream(SymbolsSubstream, SymbolSize))
67 if (
auto EC = Reader.
readSubstream(C11LinesSubstream, C11Size))
69 if (
auto EC = Reader.
readSubstream(C13LinesSubstream, C13Size))
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;
117 auto Iter = SymbolArray.
at(Offset);
128 return !C13LinesSubstream.
empty();
137 if (
SS.kind() != DebugSubsectionKind::FileChecksums)
140 if (
auto EC = Result.initialize(
SS.getRecordData()))
BinarySubstreamRef getGlobalRefsSubstream() const
iterator_range< DebugSubsectionIterator > subsections() const
void setOffset(uint64_t Off)
This is an optimization pass for GlobalISel generic memory operations.
const codeview::CVSymbolArray getSymbolArrayForScope(uint32_t ScopeBegin) const
iterator_range< T > make_range(T x, T y)
Convenience function for iterating over sub-ranges.
codeview::CVSymbol readSymbolAtOffset(uint32_t Offset) const
BinarySubstreamRef getC13LinesSubstream() const
static ErrorSuccess success()
Create a success value.
const uint16_t kInvalidStreamIndex
uint64_t bytesRemaining() const
Expected< codeview::DebugChecksumsSubsectionRef > findChecksumsSubsection() const
Tagged union holding either a T or a Error.
iterator_range< codeview::CVSymbolArray::Iterator > symbols(bool *HadError) const
static GCRegistry::Add< CoreCLRGC > E("coreclr", "CoreCLR-compatible GC")
BinaryStreamRef StreamData
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.
BinarySubstreamRef getSymbolsSubstream() const
Provides read only access to a subclass of BinaryStream.
uint32_t getSymbolDebugInfoByteSize() const
compiles ldr LCPI1_0 ldr ldr mov lsr tst moveq r1 ldr LCPI1_1 and r0 bx lr It would be better to do something like to fold the shift into the conditional move
uint32_t getC11LineInfoByteSize() const
assert(ImpDefSCC.getReg()==AMDGPU::SCC &&ImpDefSCC.isDef())
OutputIt move(R &&Range, OutputIt Out)
Provide wrappers to std::move which take ranges instead of having to pass begin/end explicitly.
A Module instance is used to store all the information related to an LLVM module.
CVRecord is a fat pointer (base + size pair) to a symbol or type record.
add sub stmia L5 ldr r0 bl L_printf $stub Instead of a and a wouldn t it be better to do three moves *Return an aggregate type is even return S
Iterator begin(bool *HadError=nullptr) const
CVSymbolArray limitSymbolArrayToScope(const CVSymbolArray &Symbols, uint32_t ScopeBegin)
bool hasDebugSubsections() const
Lightweight error class with error context and mandatory checking.
uint16_t getModuleStreamIndex() const
uint32_t getC13LineInfoByteSize() const
A range adaptor for a pair of iterators.
Iterator at(uint32_t Offset) const
given an offset into the array's underlying stream, return an iterator to the record at that offset.
BinarySubstreamRef getC11LinesSubstream() const
BinaryStreamRef is to BinaryStream what ArrayRef is to an Array.