LLVM 22.0.0git
|
CASContext for LLVM builtin CAS using BLAKE3 hash type. More...
#include "llvm/CAS/BuiltinCASContext.h"
Public Member Functions | |
StringRef | getHashSchemaIdentifier () const final |
Get an identifer for the schema used by this CAS context. | |
BuiltinCASContext ()=default | |
Public Member Functions inherited from llvm::cas::CASContext | |
virtual | ~CASContext ()=default |
Static Public Member Functions | |
static StringRef | getHashName () |
Get the name of the hash for any table identifiers. | |
static const BuiltinCASContext & | getDefaultContext () |
static Expected< HashType > | parseID (StringRef PrintedDigest) |
static void | printID (ArrayRef< uint8_t > Digest, raw_ostream &OS) |
CASContext for LLVM builtin CAS using BLAKE3 hash type.
Definition at line 58 of file BuiltinCASContext.h.
|
default |
Referenced by getDefaultContext().
|
static |
Definition at line 60 of file BuiltinCAS.cpp.
References BuiltinCASContext().
|
inlinestatic |
Get the name of the hash for any table identifiers.
FIXME: This should be configurable via an enum, with at the following values:
"BLAKE3" => 32B hash from BLAKE3 "BLAKE3.16" => 16B hash from BLAKE3 (truncated)
Enum can be sent into createInMemoryCAS() and createOnDiskCAS().
Definition at line 72 of file BuiltinCASContext.h.
Referenced by getHashSchemaIdentifier().
|
inlinefinalvirtual |
Get an identifer for the schema used by this CAS context.
Two CAS instances should return true
for this identifier if and only if their CASIDs are safe to compare by hash. This is used by CASID::equalsImpl().
Implements llvm::cas::CASContext.
Definition at line 73 of file BuiltinCASContext.h.
References const, and getHashName().
Definition at line 21 of file BuiltinCAS.cpp.
References assert(), llvm::copy(), llvm::createStringError(), getCASIDPrefix(), and llvm::tryGetFromHex().
Referenced by llvm::cas::builtin::BuiltinCAS::parseID().
|
static |
Definition at line 50 of file BuiltinCAS.cpp.
References getCASIDPrefix(), and llvm::toHex().