17#ifndef LLVM_CAS_ONDISKDATAALLOCATOR_H
18#define LLVM_CAS_ONDISKDATAALLOCATOR_H
40 assert(Offset &&
"Null dereference");
44 assert(Offset &&
"Null dereference");
53 : Offset(Offset), Value(Value) {}
76 std::optional<uint64_t> NewFileInitialSize,
78 std::shared_ptr<ondisk::OnDiskCASLogger>
Logger =
nullptr,
93 std::unique_ptr<ImplType> Impl;
assert(UImm &&(UImm !=~static_cast< T >(0)) &&"Invalid immediate!")
#define LLVM_ABI_FOR_TEST
This file declares interface for FileOffset that represent stored data at an offset from the beginnin...
This file declares interface for OnDiskCASLogger, an interface that can be used to log CAS events to ...
Tagged union holding either a T or a Error.
Logging utility - given an ordered specification of features, and assuming a scalar reward,...
MutableArrayRef - Represent a mutable reference to an array (0 or more elements consecutively in memo...
Twine - A lightweight data structure for efficiently representing the concatenation of temporary valu...
LLVM Value Representation.
FileOffset is a wrapper around uint64_t to represent the offset of data from the beginning of the fil...
const ValueProxy & operator*() const
const ValueProxy * operator->() const
friend class OnDiskDataAllocator
FileOffset getOffset() const
LLVM_ABI_FOR_TEST ~OnDiskDataAllocator()
MutableArrayRef< uint8_t > getUserHeader() const
LLVM_ABI_FOR_TEST Expected< OnDiskPtr > allocate(size_t Size)
Allocate at least Size with 8-byte alignment.
OnDiskDataAllocator & operator=(const OnDiskDataAllocator &)=delete
LLVM_ABI_FOR_TEST Expected< ArrayRef< char > > get(FileOffset Offset, size_t Size) const
Get the data of Size stored at the given Offset.
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)
LLVM_ABI_FOR_TEST size_t size() const
MutableArrayRef< char > ValueProxy
LLVM_ABI_FOR_TEST OnDiskDataAllocator & operator=(OnDiskDataAllocator &&RHS)
LLVM_ABI_FOR_TEST OnDiskDataAllocator(OnDiskDataAllocator &&RHS)
OnDiskDataAllocator(const OnDiskDataAllocator &)=delete
LLVM_ABI_FOR_TEST size_t capacity() const
An efficient, type-erasing, non-owning reference to a callable.