LLVM  6.0.0svn
Public Member Functions | List of all members
llvm::DebugEpochBase::HandleBase Class Reference

A base class for iterator classes ("handles") that wish to poll for iterator invalidating modifications in the underlying data structure. More...

#include "llvm/ADT/EpochTracker.h"

Inheritance diagram for llvm::DebugEpochBase::HandleBase:
Inheritance graph
[legend]

Public Member Functions

 HandleBase ()
 
 HandleBase (const DebugEpochBase *Parent)
 
bool isHandleInSync () const
 Returns true if the DebugEpochBase this Handle is linked to has not called incrementEpoch on itself since the creation of this HandleBase instance. More...
 
const void * getEpochAddress () const
 Returns a pointer to the epoch word stored in the data structure this handle points into. More...
 

Detailed Description

A base class for iterator classes ("handles") that wish to poll for iterator invalidating modifications in the underlying data structure.

When LLVM is built without asserts, this class is empty and does nothing.

HandleBase does not track the parent data structure by itself. It expects the routines modifying the data structure to call incrementEpoch when they make an iterator-invalidating modification.

Definition at line 59 of file EpochTracker.h.

Constructor & Destructor Documentation

◆ HandleBase() [1/2]

llvm::DebugEpochBase::HandleBase::HandleBase ( )
inline

Definition at line 64 of file EpochTracker.h.

Referenced by getEpochAddress().

◆ HandleBase() [2/2]

llvm::DebugEpochBase::HandleBase::HandleBase ( const DebugEpochBase Parent)
inlineexplicit

Definition at line 66 of file EpochTracker.h.

Member Function Documentation

◆ getEpochAddress()

const void* llvm::DebugEpochBase::HandleBase::getEpochAddress ( ) const
inline

Returns a pointer to the epoch word stored in the data structure this handle points into.

Can be used to check if two iterators point into the same data structure.

Definition at line 77 of file EpochTracker.h.

References HandleBase(), llvm::DebugEpochBase::incrementEpoch(), and isHandleInSync().

Referenced by llvm::DenseMapIterator< KeyT, ValueT, KeyInfoT, Bucket, IsConst >::operator!=(), and llvm::DenseMapIterator< KeyT, ValueT, KeyInfoT, Bucket, IsConst >::operator==().

◆ isHandleInSync()

bool llvm::DebugEpochBase::HandleBase::isHandleInSync ( ) const
inline

Returns true if the DebugEpochBase this Handle is linked to has not called incrementEpoch on itself since the creation of this HandleBase instance.

Definition at line 72 of file EpochTracker.h.

Referenced by getEpochAddress(), llvm::DenseMapIterator< KeyT, ValueT, KeyInfoT, Bucket, IsConst >::operator!=(), and llvm::DenseMapIterator< KeyT, ValueT, KeyInfoT, Bucket, IsConst >::operator==().


The documentation for this class was generated from the following file: