15#ifndef LLVM_CAS_NAMEDVALUESSCHEMA_H
16#define LLVM_CAS_NAMEDVALUESSCHEMA_H
42 return LHS.Name <
RHS.Name;
50 :
public RTTIExtends<NamedValuesSchema, NodeSchema> {
51 void anchor()
override;
115 "llvm::cas::schema::namedvalues::v1";
116 std::optional<ObjectRef> NamedValuesKindRef;
128 return Schema->forEachEntry(*
this, Callback);
135 size_t size()
const {
return Schema->getNumEntries(*
this); }
139 if (
auto I = Schema->lookupEntry(*
this, Name))
AMDGPU Mark last scratch load
This file defines the BumpPtrAllocator interface.
static GCRegistry::Add< CoreCLRGC > E("coreclr", "CoreCLR-compatible GC")
This file contains the declaration of the ObjectStore class.
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.
Inheritance utility for extensible RTTI.
This is a 'vector' (really, a variable-sized array), optimized for the case when the array is small.
A wrapper around a string literal that serves as a proxy for constructing global tables of StringRefs...
StringRef - Represent a constant reference to a string, i.e.
A proxy for a loaded CAS Object in NamedValuesSchema.
bool empty() const
Check if the object is empty.
Error forEachEntry(function_ref< Error(const NamedValuesEntry &)> Callback) const
Iterate over entries with a callback.
friend class NamedValuesSchema
NamedValuesEntry get(size_t I) const
Get an entry by index.
const NamedValuesSchema & getSchema() const
Get the schema associated with this proxy.
std::optional< NamedValuesEntry > lookup(StringRef Name) const
Lookup an entry by name.
LLVM_ABI StringRef getName(size_t I) const
Get the name of an entry by index.
size_t size() const
Get the number of entries in the CAS object.
Builder(ObjectStore &CAS)
A schema for representing an array of named nodes in a CAS.
friend class NamedValuesProxy
bool isRootNode(const ObjectProxy &Node) const final
bool isNode(const ObjectProxy &Node) const final
Check if a proxy represents a valid node.
Reference to an abstract hierarchical node, with data and references.
Reference to an object in an ObjectStore instance.
Content-addressable storage for objects.
An efficient, type-erasing, non-owning reference to a callable.
@ Ref
The access may reference the value stored in memory.
BumpPtrAllocatorImpl<> BumpPtrAllocator
The standard BumpPtrAllocator which just uses the default template parameters.
Represents an entry in NamedValuesSchema.
NamedValuesEntry(StringRef Name, ObjectRef Ref)
friend bool operator==(const NamedValuesEntry &LHS, const NamedValuesEntry &RHS)
friend bool operator<(const NamedValuesEntry &LHS, const NamedValuesEntry &RHS)
Ordering the entries by name. Items should have unique names.