|
LLVM
4.0.0
|
A base class for data structure classes wishing to make iterators ("handles") pointing into themselves fail-fast. More...
#include <EpochTracker.h>
Classes | |
| class | HandleBase |
| A base class for iterator classes ("handles") that wish to poll for iterator invalidating modifications in the underlying data structure. More... | |
Public Member Functions | |
| DebugEpochBase () | |
| void | incrementEpoch () |
| Calling incrementEpoch invalidates all handles pointing into the calling instance. More... | |
| ~DebugEpochBase () | |
| The destructor calls incrementEpoch to make use-after-free bugs more likely to crash deterministically. More... | |
A base class for data structure classes wishing to make iterators ("handles") pointing into themselves fail-fast.
When building without asserts, this class is empty and does nothing.
DebugEpochBase does not by itself track handles pointing into itself. The expectation is that routines touching the handles will poll on isHandleInSync at appropriate points to assert that the handle they're using is still valid.
Definition at line 37 of file EpochTracker.h.
|
inline |
Definition at line 41 of file EpochTracker.h.
|
inline |
The destructor calls incrementEpoch to make use-after-free bugs more likely to crash deterministically.
Definition at line 49 of file EpochTracker.h.
References incrementEpoch().
|
inline |
Calling incrementEpoch invalidates all handles pointing into the calling instance.
Definition at line 45 of file EpochTracker.h.
Referenced by llvm::DenseMapBase< SmallDenseMap< KeyT, ValueT, InlineBuckets, KeyInfoT, BucketT >, KeyT, ValueT, KeyInfoT, BucketT >::clear(), llvm::DenseMapBase< SmallDenseMap< KeyT, ValueT, InlineBuckets, KeyInfoT, BucketT >, KeyT, ValueT, KeyInfoT, BucketT >::reserve(), llvm::DenseMap< unsigned, unsigned >::swap(), and ~DebugEpochBase().
1.8.6