15#ifndef LLVM_CAS_ONDISKKEYVALUEDB_H
16#define LLVM_CAS_ONDISKKEYVALUEDB_H
27class OnDiskKeyValueDB {
50 return Cache.size() * 100ULL / Cache.capacity();
74 : ValueSize(ValueSize), Cache(
std::
move(Cache)) {}
76 const size_t ValueSize;
This file declares interface for OnDiskTrieRawHashMap, a thread-safe and (mostly) lock-free hash map ...
ArrayRef - Represent a constant reference to an array (0 or more elements consecutively in memory),...
Lightweight error class with error context and mandatory checking.
Tagged union holding either a T or a Error.
StringRef - Represent a constant reference to a string, i.e.
LLVM Value Representation.
FileOffset is a wrapper around uint64_t to represent the offset of data from the beginning of the fil...
OnDiskTrieRawHashMap is a persistent trie data structure used as hash maps.
Expected< ArrayRef< char > > put(ArrayRef< uint8_t > Key, ArrayRef< char > Value)
Associate a value with a key.
Expected< std::optional< ArrayRef< char > > > get(ArrayRef< uint8_t > Key)
static Expected< std::unique_ptr< OnDiskKeyValueDB > > open(StringRef Path, StringRef HashName, unsigned KeySize, StringRef ValueName, size_t ValueSize)
Open the on-disk store from a directory.
size_t getStorageSize() const
function_ref< Error(FileOffset Offset, ArrayRef< char > Data)> CheckValueT
unsigned getHardStorageLimitUtilization() const
Error validate(CheckValueT CheckValue) const
Validate the storage with a callback CheckValue to check the stored value.
An efficient, type-erasing, non-owning reference to a callable.
StringMapEntry< Value * > ValueName
LLVM_ATTRIBUTE_VISIBILITY_DEFAULT AnalysisKey InnerAnalysisManagerProxy< AnalysisManagerT, IRUnitT, ExtraArgTs... >::Key
FunctionAddr VTableAddr uintptr_t uintptr_t Data
OutputIt move(R &&Range, OutputIt Out)
Provide wrappers to std::move which take ranges instead of having to pass begin/end explicitly.
Implement std::hash so that hash_code can be used in STL containers.