9#ifndef LLVM_CAS_CASREFERENCE_H
10#define LLVM_CAS_CASREFERENCE_H
37#if LLVM_ENABLE_ABI_BREAKING_CHECKS
38 assert(CAS == &ExpectedCAS &&
"Extracting reference for the wrong CAS");
60#if LLVM_ENABLE_ABI_BREAKING_CHECKS
63 "Cannot compare across CAS instances");
65 return InternalRef ==
RHS.InternalRef;
71 : InternalRef(InternalRef) {
72#if LLVM_ENABLE_ABI_BREAKING_CHECKS
77 "Reserved for DenseMapInfo");
87#if LLVM_ENABLE_ABI_BREAKING_CHECKS
109 struct DenseMapTag {};
113 return LHS.hasSameInternalRef(
RHS);
137 assert(InternalRef != -1ULL &&
"Reserved for DenseMapInfo");
138 assert(InternalRef != -2ULL &&
"Reserved for DenseMapInfo");
153 return LHS.hasSameInternalRef(
RHS);
185 return Ref.getDenseMapHash();
assert(UImm &&(UImm !=~static_cast< T >(0)) &&"Invalid immediate!")
#define LLVM_DUMP_METHOD
Mark debug helper function definitions like dump() that should not be stripped from debug builds.
This file defines DenseMapInfo traits for DenseMap.
Handle to a loaded object in a ObjectStore instance.
void print(raw_ostream &OS) const
Print internal ref and/or CASID. Only suitable for debugging.
friend bool operator!=(const ObjectHandle &LHS, const ObjectHandle &RHS)
LLVM_DUMP_METHOD void dump() const
friend bool operator==(const ObjectHandle &LHS, const ObjectHandle &RHS)
Reference to an object in an ObjectStore instance.
void print(raw_ostream &OS) const
Print internal ref and/or CASID. Only suitable for debugging.
friend bool operator==(const ObjectRef &LHS, const ObjectRef &RHS)
friend class ReferenceBase
friend bool operator!=(const ObjectRef &LHS, const ObjectRef &RHS)
static ObjectRef getDenseMapEmptyKey()
static ObjectRef getDenseMapTombstoneKey()
LLVM_DUMP_METHOD void dump() const
Content-addressable storage for objects.
Base class for references to things in ObjectStore.
static constexpr uint64_t getDenseMapTombstoneRef()
uint64_t getInternalRef(const ObjectStore &ExpectedCAS) const
Get an internal reference.
ReferenceBase(DenseMapEmptyTag)
static constexpr uint64_t getDenseMapEmptyRef()
bool isDenseMapTombstone() const
bool isDenseMapEmpty() const
void print(raw_ostream &OS, const ObjectHandle &This) const
bool isDenseMapSentinel() const
ReferenceBase(const ObjectStore *CAS, uint64_t InternalRef, bool IsHandle)
ReferenceBase(DenseMapTombstoneTag)
bool hasSameInternalRef(const ReferenceBase &RHS) const
unsigned getDenseMapHash() const
Helper functions for DenseMapInfo.
This class implements an extremely fast bulk output stream that can only output to a stream.
This is an optimization pass for GlobalISel generic memory operations.
hash_code hash_value(const FixedPointSemantics &Val)
@ Ref
The access may reference the value stored in memory.
static bool isEqual(cas::ObjectRef LHS, cas::ObjectRef RHS)
static cas::ObjectRef getTombstoneKey()
static unsigned getHashValue(cas::ObjectRef Ref)
static cas::ObjectRef getEmptyKey()
An information struct used to provide DenseMap with the various necessary components for a given valu...