LLVM: include/llvm/CAS/BuiltinCASContext.h Source File (original) (raw)
Go to the documentation of this file.
1
2
3
4
5
6
7
8
9#ifndef LLVM_CAS_BUILTINCASCONTEXT_H
10#define LLVM_CAS_BUILTINCASCONTEXT_H
11
15
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
56
57
60 void anchor() override;
61
62public:
63
64
65
66
67
68
69
70
71
74 static const std::string ID =
75 ("llvm.cas.builtin.v2[" + getHashName() + "]").str();
76 return ID;
77 }
78
80
82
85};
86
87}
88
89#endif
ArrayRef - Represent a constant reference to an array (0 or more elements consecutively in memory),...
A class that wraps the BLAKE3 algorithm.
static BLAKE3Result< NumBytes > hash(ArrayRef< uint8_t > Data)
Returns a BLAKE3 hash for the given data.
Tagged union holding either a T or a Error.
StringRef - Represent a constant reference to a string, i.e.
Context for CAS identifiers.
CASContext for LLVM builtin CAS using BLAKE3 hash type.
Definition BuiltinCASContext.h:58
StringRef getHashSchemaIdentifier() const final
Get an identifer for the schema used by this CAS context.
Definition BuiltinCASContext.h:73
BuiltinCASContext()=default
static const BuiltinCASContext & getDefaultContext()
static Expected< HashType > parseID(StringRef PrintedDigest)
static void printID(ArrayRef< uint8_t > Digest, raw_ostream &OS)
static StringRef getHashName()
Get the name of the hash for any table identifiers.
Definition BuiltinCASContext.h:72
This class implements an extremely fast bulk output stream that can only output to a stream.
unsigned ID
LLVM IR allows to use arbitrary numbers as calling convention identifiers.
Definition BuiltinCASContext.h:16
BLAKE3 HasherT
Current hash type for the builtin CAS.
Definition BuiltinCASContext.h:54
decltype(HasherT::hash(std::declval< ArrayRef< uint8_t > & >())) HashType
Definition BuiltinCASContext.h:55