11 #ifndef LLVM_DEBUGINFO_MSF_MAPPEDBLOCKSTREAM_H
12 #define LLVM_DEBUGINFO_MSF_MAPPEDBLOCKSTREAM_H
43 static std::unique_ptr<MappedBlockStream>
47 static std::unique_ptr<MappedBlockStream>
51 static std::unique_ptr<MappedBlockStream>
54 static std::unique_ptr<MappedBlockStream>
89 const MSFStreamLayout StreamLayout;
90 const ReadableStream &MsfData;
99 static std::unique_ptr<WritableMappedBlockStream>
103 static std::unique_ptr<WritableMappedBlockStream>
107 static std::unique_ptr<WritableMappedBlockStream>
110 static std::unique_ptr<WritableMappedBlockStream>
124 return ReadInterface.getStreamLayout();
144 #endif // LLVM_DEBUGINFO_MSF_MAPPEDBLOCKSTREAM_H
static std::unique_ptr< MappedBlockStream > createStream(uint32_t BlockSize, uint32_t NumBlocks, const MSFStreamLayout &Layout, const ReadableStream &MsfData)
Error writeBytes(uint32_t Offset, ArrayRef< uint8_t > Buffer) const override
uint32_t getNumBlocks() const
static std::unique_ptr< WritableMappedBlockStream > createDirectoryStream(const MSFLayout &Layout, const WritableStream &MsfData)
uint32_t getLength() const override
This file defines the MallocAllocator and BumpPtrAllocator interfaces.
Describes the layout of a stream in an MSF layout.
Error readLongestContiguousChunk(uint32_t Offset, ArrayRef< uint8_t > &Buffer) const override
Error readBytes(uint32_t Offset, uint32_t Size, ArrayRef< uint8_t > &Buffer) const override
static std::unique_ptr< WritableMappedBlockStream > createFpmStream(const MSFLayout &Layout, const WritableStream &MsfData)
static std::unique_ptr< MappedBlockStream > createDirectoryStream(const MSFLayout &Layout, const ReadableStream &MsfData)
static std::unique_ptr< WritableMappedBlockStream > createStream(uint32_t BlockSize, uint32_t NumBlocks, const MSFStreamLayout &Layout, const WritableStream &MsfData)
uint32_t getNumBlocks() const
static std::unique_ptr< MappedBlockStream > createFpmStream(const MSFLayout &Layout, const ReadableStream &MsfData)
Error readBytes(uint32_t Offset, uint32_t Size, ArrayRef< uint8_t > &Buffer) const override
MappedBlockStream(uint32_t BlockSize, uint32_t NumBlocks, const MSFStreamLayout &StreamLayout, const ReadableStream &MsfData)
Allocate memory in an ever growing pool, as if by bump-pointer.
uint32_t getStreamLength() const
static const int BlockSize
uint32_t getBlockSize() const
WritableMappedBlockStream(uint32_t BlockSize, uint32_t NumBlocks, const MSFStreamLayout &StreamLayout, const WritableStream &MsfData)
static std::unique_ptr< MappedBlockStream > createIndexedStream(const MSFLayout &Layout, const ReadableStream &MsfData, uint32_t StreamIndex)
uint32_t getStreamLength() const
Error readLongestContiguousChunk(uint32_t Offset, ArrayRef< uint8_t > &Buffer) const override
uint32_t getNumBytesCopied() const
uint32_t getLength() const override
static std::unique_ptr< WritableMappedBlockStream > createIndexedStream(const MSFLayout &Layout, const WritableStream &MsfData, uint32_t StreamIndex)
Error commit() const override
MappedBlockStream represents data stored in an MSF file into chunks of a particular size (called the ...
Lightweight error class with error context and mandatory checking.
uint32_t getBlockSize() const
llvm::BumpPtrAllocator & getAllocator()
const MSFStreamLayout & getStreamLayout() const