|
LLVM
5.0.0
|
#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 | |
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) |
Protected Member Functions | |
| WritableMappedBlockStream (uint32_t BlockSize, const MSFStreamLayout &StreamLayout, WritableBinaryStreamRef MsfData, BumpPtrAllocator &Allocator) | |
Protected Member Functions inherited from llvm::BinaryStream | |
| Error | checkOffset (uint32_t Offset, uint32_t DataSize) |
Definition at line 108 of file MappedBlockStream.h.
|
protected |
Definition at line 325 of file MappedBlockStream.cpp.
|
overridevirtual |
For buffered streams, commits changes to the backing store.
Implements llvm::WritableBinaryStream.
Definition at line 419 of file MappedBlockStream.cpp.
References llvm::WritableBinaryStreamRef::commit().
|
static |
|
static |
Definition at line 363 of file MappedBlockStream.cpp.
References llvm::msf::SuperBlock::BlockSize, createStream(), initializeFpmStreamLayout(), and llvm::msf::MSFLayout::SB.
|
static |
Definition at line 341 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 332 of file MappedBlockStream.cpp.
References Allocator, and BlockSize.
Referenced by createDirectoryStream(), createFpmStream(), and createIndexedStream().
|
inline |
Definition at line 145 of file MappedBlockStream.h.
References llvm::msf::MappedBlockStream::getBlockSize().
Referenced by writeBytes().
|
inlineoverridevirtual |
Implements llvm::BinaryStream.
Definition at line 127 of file MappedBlockStream.h.
References llvm::support::little.
|
overridevirtual |
Return the number of bytes of data in this stream.
Implements llvm::BinaryStream.
Definition at line 381 of file MappedBlockStream.cpp.
References llvm::msf::MappedBlockStream::getLength().
|
inline |
Definition at line 146 of file MappedBlockStream.h.
References llvm::msf::MappedBlockStream::getNumBlocks().
|
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::getStreamLength().
|
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 371 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 376 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 385 of file MappedBlockStream.cpp.
References llvm::msf::MSFStreamLayout::Blocks, llvm::msf::blockToOffset(), llvm::BinaryStream::checkOffset(), llvm::ArrayRef< T >::data(), getBlockSize(), getStreamLayout(), fuzzer::min(), llvm::ArrayRef< T >::size(), llvm::Error::success(), and llvm::WritableBinaryStreamRef::writeBytes().
1.8.6