9#ifndef LLVM_CAS_CASREFERENCE_H
10#define LLVM_CAS_CASREFERENCE_H
35#if LLVM_ENABLE_ABI_BREAKING_CHECKS
36 assert(CAS == &ExpectedCAS &&
"Extracting reference for the wrong CAS");
58#if LLVM_ENABLE_ABI_BREAKING_CHECKS
61 "Cannot compare across CAS instances");
63 return InternalRef ==
RHS.InternalRef;
69 : InternalRef(InternalRef) {
70#if LLVM_ENABLE_ABI_BREAKING_CHECKS
75 "Reserved for DenseMapInfo");
81#if LLVM_ENABLE_ABI_BREAKING_CHECKS
105 return LHS.hasSameInternalRef(
RHS);
122 assert(InternalRef != -1ULL &&
"Reserved for DenseMapInfo");
123 assert(InternalRef != -2ULL &&
"Reserved for DenseMapInfo");
136 return LHS.hasSameInternalRef(
RHS);
160 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.
friend class ReferenceBase
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)
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.
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)
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 unsigned getHashValue(cas::ObjectRef Ref)
An information struct used to provide DenseMap with the various necessary components for a given valu...