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 | |
![]() | |
virtual | ~CASContext ()=default |
virtual StringRef | getHashSchemaIdentifier () const =0 |
Get an identifer for the schema used by this CAS context. | |
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) |
Additional Inherited Members | |
virtual void | printIDImpl (raw_ostream &OS, const CASID &ID) const =0 |
Print ID to OS . | |
CASContext for LLVM builtin CAS using BLAKE3 hash type.
Definition at line 58 of file BuiltinCASContext.h.
|
default |
|
static |
Definition at line 60 of file BuiltinCAS.cpp.
|
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 getHashName().
Definition at line 21 of file BuiltinCAS.cpp.
References assert(), llvm::copy(), llvm::createStringError(), and getCASIDPrefix().
Referenced by llvm::cas::builtin::BuiltinCAS::parseID().
|
static |
Definition at line 50 of file BuiltinCAS.cpp.
References getCASIDPrefix(), and OS.