16 #ifndef LLVM_ADT_EPOCH_TRACKER_H 17 #define LLVM_ADT_EPOCH_TRACKER_H 23 #ifdef NDEBUG //ifndef LLVM_ENABLE_ABI_BREAKING_CHECKS 25 class DebugEpochBase {
31 HandleBase() =
default;
32 explicit HandleBase(
const DebugEpochBase *) {}
72 const uint64_t *EpochAddress;
73 uint64_t EpochAtCreation;
76 HandleBase() : EpochAddress(
nullptr), EpochAtCreation(UINT64_MAX) {}
79 : EpochAddress(&Parent->Epoch), EpochAtCreation(Parent->Epoch) {}
93 #endif // LLVM_ENABLE_ABI_BREAKING_CHECKS
A base class for data structure classes wishing to make iterators ("handles") pointing into themselve...
Definition: EpochTracker.h:49
const void * getEpochAddress() const
Returns a pointer to the epoch word stored in the data structure this handle points into...
Definition: EpochTracker.h:89
~DebugEpochBase()
The destructor calls incrementEpoch to make use-after-free bugs more likely to crash deterministicall...
Definition: EpochTracker.h:61
void incrementEpoch()
Calling incrementEpoch invalidates all handles pointing into the calling instance.
Definition: EpochTracker.h:57
A base class for iterator classes ("handles") that wish to poll for iterator invalidating modificatio...
Definition: EpochTracker.h:71
bool isHandleInSync() const
Returns true if the DebugEpochBase this Handle is linked to has not called incrementEpoch on itself s...
Definition: EpochTracker.h:84