LLVM: llvm::sandboxir::Tracker Class Reference (original) (raw)

The tracker collects all the change objects and implements the main API for saving / reverting / accepting. More...

#include "[llvm/SandboxIR/Tracker.h](Tracker%5F8h%5Fsource.html)"

Public Types
enum class TrackerState { Disabled, Record, Reverting }
Public Member Functions
Tracker (Context &Ctx)
LLVM_ABI ~Tracker ()
Context & getContext () const
bool empty () const
\Returns true if there are no changes tracked.
void track (std::unique_ptr< IRChangeBase > &&Change)
Record Change and take ownership.
template<typename ChangeT, typename... ArgsT>
bool emplaceIfTracking (ArgsT... Args)
A convenience wrapper for track() that constructs and tracks the Change object if tracking is enabled.
bool isTracking () const
\Returns true if the tracker is recording changes.
TrackerState getState () const
\Returns the current state of the tracker.
LLVM_ABI void save ()
Turns on IR tracking.
LLVM_ABI void accept ()
Stops tracking and accept changes.
LLVM_ABI void revert ()
Stops tracking and reverts to saved state.
void dump (raw_ostream &OS) const
LLVM_DUMP_METHOD void dump () const
Public Attributes
bool InMiddleOfCreatingChange = false
Helps catch bugs where we are creating new change objects while in the middle of creating other change objects.

The tracker collects all the change objects and implements the main API for saving / reverting / accepting.

Definition at line 442 of file Tracker.h.

TrackerState

Enumerator
Disabled
Record Tracking is disabled
Reverting Tracking changes

Definition at line 444 of file Tracker.h.

llvm::sandboxir::Tracker::Tracker ( Context & Ctx) inlineexplicit

~Tracker()

accept()

dump() [1/2]

void Tracker::dump ( ) const

dump() [2/2]

emplaceIfTracking()

template<typename ChangeT, typename... ArgsT>

bool llvm::sandboxir::Tracker::emplaceIfTracking ( ArgsT... Args) inline

empty()

bool llvm::sandboxir::Tracker::empty ( ) const inline

getContext()

Context & llvm::sandboxir::Tracker::getContext ( ) const inline

getState()

TrackerState llvm::sandboxir::Tracker::getState ( ) const inline

\Returns the current state of the tracker.

Definition at line 509 of file Tracker.h.

isTracking()

bool llvm::sandboxir::Tracker::isTracking ( ) const inline

revert()

save()

track()

void llvm::sandboxir::Tracker::track ( std::unique_ptr< IRChangeBase > && Change) inline

operator<<

InMiddleOfCreatingChange

bool llvm::sandboxir::Tracker::InMiddleOfCreatingChange = false

Helps catch bugs where we are creating new change objects while in the middle of creating other change objects.

Definition at line 465 of file Tracker.h.

Referenced by track().


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