LLVM
8.0.1
|
#include "llvm/DebugInfo/MSF/MappedBlockStream.h"
Public Member Functions | |
support::endianness | getEndian () const override |
Error | readBytes (uint32_t Offset, uint32_t Size, ArrayRef< uint8_t > &Buffer) override |
Given an offset into the stream and a number of bytes, attempt to read the bytes and set the output ArrayRef to point to data owned by the stream. More... | |
Error | readLongestContiguousChunk (uint32_t Offset, ArrayRef< uint8_t > &Buffer) override |
Given an offset into the stream, read as much as possible without copying any data. More... | |
uint32_t | getLength () override |
Return the number of bytes of data in this stream. More... | |
Error | writeBytes (uint32_t Offset, ArrayRef< uint8_t > Buffer) override |
Attempt to write the given bytes into the stream at the desired offset. More... | |
Error | commit () override |
For buffered streams, commits changes to the backing store. More... | |
const MSFStreamLayout & | getStreamLayout () const |
uint32_t | getBlockSize () const |
uint32_t | getNumBlocks () const |
uint32_t | getStreamLength () const |
Public Member Functions inherited from llvm::WritableBinaryStream | |
~WritableBinaryStream () override=default | |
BinaryStreamFlags | getFlags () const override |
Return the properties of this stream. More... | |
Public Member Functions inherited from llvm::BinaryStream | |
virtual | ~BinaryStream ()=default |
Static Public Member Functions | |
static std::unique_ptr< WritableMappedBlockStream > | createStream (uint32_t BlockSize, const MSFStreamLayout &Layout, WritableBinaryStreamRef MsfData, BumpPtrAllocator &Allocator) |
static std::unique_ptr< WritableMappedBlockStream > | createIndexedStream (const MSFLayout &Layout, WritableBinaryStreamRef MsfData, uint32_t StreamIndex, BumpPtrAllocator &Allocator) |
static std::unique_ptr< WritableMappedBlockStream > | createDirectoryStream (const MSFLayout &Layout, WritableBinaryStreamRef MsfData, BumpPtrAllocator &Allocator) |
static std::unique_ptr< WritableMappedBlockStream > | createFpmStream (const MSFLayout &Layout, WritableBinaryStreamRef MsfData, BumpPtrAllocator &Allocator, bool AltFpm=false) |
Protected Member Functions | |
WritableMappedBlockStream (uint32_t BlockSize, const MSFStreamLayout &StreamLayout, WritableBinaryStreamRef MsfData, BumpPtrAllocator &Allocator) | |
Protected Member Functions inherited from llvm::WritableBinaryStream | |
Error | checkOffsetForWrite (uint32_t Offset, uint32_t DataSize) |
Protected Member Functions inherited from llvm::BinaryStream | |
Error | checkOffsetForRead (uint32_t Offset, uint32_t DataSize) |
Definition at line 108 of file MappedBlockStream.h.
|
protected |
Definition at line 311 of file MappedBlockStream.cpp.
|
overridevirtual |
For buffered streams, commits changes to the backing store.
Implements llvm::WritableBinaryStream.
Definition at line 422 of file MappedBlockStream.cpp.
References llvm::WritableBinaryStreamRef::commit().
|
static |
Definition at line 339 of file MappedBlockStream.cpp.
References llvm::msf::MSFStreamLayout::Blocks, llvm::msf::SuperBlock::BlockSize, createStream(), llvm::msf::MSFLayout::DirectoryBlocks, llvm::msf::MSFStreamLayout::Length, llvm::msf::SuperBlock::NumDirectoryBytes, and llvm::msf::MSFLayout::SB.
Referenced by llvm::msf::MSFBuilder::commit().
|
static |
Definition at line 349 of file MappedBlockStream.cpp.
References llvm::msf::SuperBlock::BlockSize, llvm::BinaryStreamWriter::bytesRemaining(), llvm::cantFail(), createStream(), llvm::msf::getFpmStreamLayout(), llvm::msf::MSFLayout::SB, and llvm::BinaryStreamWriter::writeBytes().
Referenced by commitFpm().
|
static |
Definition at line 327 of file MappedBlockStream.cpp.
References assert(), llvm::msf::MSFStreamLayout::Blocks, llvm::msf::SuperBlock::BlockSize, createStream(), llvm::msf::MSFLayout::SB, llvm::msf::MSFLayout::StreamMap, and llvm::msf::MSFLayout::StreamSizes.
|
static |
Definition at line 318 of file MappedBlockStream.cpp.
References Allocator, and BlockSize.
Referenced by createDirectoryStream(), createFpmStream(), and createIndexedStream().
|
inline |
Definition at line 145 of file MappedBlockStream.h.
Referenced by writeBytes().
|
inlineoverridevirtual |
Implements llvm::BinaryStream.
Definition at line 127 of file MappedBlockStream.h.
References llvm::msf::MappedBlockStream::getLength(), llvm::support::little, llvm::msf::MappedBlockStream::readBytes(), llvm::msf::MappedBlockStream::readLongestContiguousChunk(), and Size.
|
overridevirtual |
Return the number of bytes of data in this stream.
Implements llvm::BinaryStream.
Definition at line 384 of file MappedBlockStream.cpp.
References llvm::msf::MappedBlockStream::getLength().
|
inline |
Definition at line 146 of file MappedBlockStream.h.
|
inline |
Definition at line 141 of file MappedBlockStream.h.
Referenced by writeBytes().
|
inline |
Definition at line 147 of file MappedBlockStream.h.
References llvm::msf::MappedBlockStream::WritableMappedBlockStream.
|
overridevirtual |
Given an offset into the stream and a number of bytes, attempt to read the bytes and set the output ArrayRef to point to data owned by the stream.
Implements llvm::BinaryStream.
Definition at line 374 of file MappedBlockStream.cpp.
References llvm::msf::MappedBlockStream::readBytes().
|
overridevirtual |
Given an offset into the stream, read as much as possible without copying any data.
Implements llvm::BinaryStream.
Definition at line 379 of file MappedBlockStream.cpp.
References llvm::msf::MappedBlockStream::readLongestContiguousChunk().
|
overridevirtual |
Attempt to write the given bytes into the stream at the desired offset.
This will always necessitate a copy. Cannot shrink or grow the stream, only writes into existing allocated space.
Implements llvm::WritableBinaryStream.
Definition at line 388 of file MappedBlockStream.cpp.
References llvm::msf::MSFStreamLayout::Blocks, llvm::msf::blockToOffset(), llvm::WritableBinaryStream::checkOffsetForWrite(), llvm::ArrayRef< T >::data(), getBlockSize(), getStreamLayout(), llvm::ArrayRef< T >::size(), llvm::Error::success(), and llvm::WritableBinaryStreamRef::writeBytes().