LLVM: llvm::cas::ObjectRef Class Reference (original) (raw)

Reference to an object in an ObjectStore instance.

If you have an ObjectRef, you know the object exists, and you can point at it from new nodes with ObjectStore::store(), but you don't know anything about it. "Loading" the object is a separate step that may not have happened yet, and which can fail (due to filesystem corruption) or introduce latency (if downloading from a remote store).

ObjectStore::store() takes a list of these, and these are returned by ObjectStore::forEachRef() and ObjectStore::readRef(), which are accessors for nodes, and ObjectStore::getReference().

ObjectStore::load() will load the referenced object, and returns ObjectHandle, a variant that knows what kind of entity it is. ObjectStore::getReferenceKind() can expect the type of reference without asking for unloaded objects to be loaded.

Definition at line 108 of file CASReference.h.