|
LLVM 23.0.0git
|
Sink for data. More...
#include "llvm/CAS/OnDiskDataAllocator.h"
Classes | |
| struct | ImplType |
| class | OnDiskPtr |
| A pointer to data stored on disk. More... | |
Public Types | |
| using | ValueProxy = MutableArrayRef<char> |
Public Member Functions | |
| LLVM_ABI_FOR_TEST Expected< ArrayRef< char > > | get (FileOffset Offset, size_t Size) const |
Get the data of Size stored at the given Offset. | |
| LLVM_ABI_FOR_TEST Expected< OnDiskPtr > | allocate (size_t Size) |
Allocate at least Size with 8-byte alignment. | |
| MutableArrayRef< uint8_t > | getUserHeader () const |
| LLVM_ABI_FOR_TEST size_t | size () const |
| LLVM_ABI_FOR_TEST size_t | capacity () const |
| LLVM_ABI_FOR_TEST | OnDiskDataAllocator (OnDiskDataAllocator &&RHS) |
| LLVM_ABI_FOR_TEST OnDiskDataAllocator & | operator= (OnDiskDataAllocator &&RHS) |
| OnDiskDataAllocator (const OnDiskDataAllocator &)=delete | |
| OnDiskDataAllocator & | operator= (const OnDiskDataAllocator &)=delete |
| LLVM_ABI_FOR_TEST | ~OnDiskDataAllocator () |
Static Public Member Functions | |
| static LLVM_ABI_FOR_TEST Expected< OnDiskDataAllocator > | create (const Twine &Path, const Twine &TableName, uint64_t MaxFileSize, std::optional< uint64_t > NewFileInitialSize, uint32_t UserHeaderSize=0, std::shared_ptr< ondisk::OnDiskCASLogger > Logger=nullptr, function_ref< void(void *)> UserHeaderInit=nullptr) |
Sink for data.
Stores variable length data with 8-byte alignment. Does not track size of data, which is assumed to known from context, or embedded. Uses 0-padding but does not guarantee 0-termination.
Definition at line 30 of file OnDiskDataAllocator.h.
Definition at line 32 of file OnDiskDataAllocator.h.
|
default |
References LLVM_ABI_FOR_TEST, OnDiskDataAllocator(), and RHS.
Referenced by OnDiskDataAllocator(), OnDiskDataAllocator(), operator=(), and operator=().
|
delete |
References OnDiskDataAllocator().
|
default |
References LLVM_ABI_FOR_TEST.
| Expected< OnDiskDataAllocator::OnDiskPtr > OnDiskDataAllocator::allocate | ( | size_t | Size | ) |
Allocate at least Size with 8-byte alignment.
Definition at line 216 of file OnDiskDataAllocator.cpp.
References llvm::createStringError(), llvm::make_error_code(), and Size.
| size_t OnDiskDataAllocator::capacity | ( | ) | const |
Definition at line 232 of file OnDiskDataAllocator.cpp.
|
static |
Definition at line 206 of file OnDiskDataAllocator.cpp.
References llvm::createStringError(), and llvm::make_error_code().
Referenced by llvm::cas::ondisk::OnDiskGraphDB::open().
| Expected< ArrayRef< char > > OnDiskDataAllocator::get | ( | FileOffset | Offset, |
| size_t | Size ) const |
Get the data of Size stored at the given Offset.
Note the allocator doesn't keep track of the allocation size, thus Size doesn't need to match the size of allocation but needs to be smaller.
Definition at line 221 of file OnDiskDataAllocator.cpp.
References llvm::createStringError(), llvm::make_error_code(), llvm::Offset, and Size.
| MutableArrayRef< uint8_t > OnDiskDataAllocator::getUserHeader | ( | ) | const |
create time, with size UserHeaderSize. Definition at line 227 of file OnDiskDataAllocator.cpp.
|
delete |
References OnDiskDataAllocator().
|
default |
References LLVM_ABI_FOR_TEST, OnDiskDataAllocator(), and RHS.
| size_t OnDiskDataAllocator::size | ( | ) | const |
Definition at line 231 of file OnDiskDataAllocator.cpp.