LLVM 20.0.0git
Classes | Public Member Functions | List of all members
llvm::sandboxir::GenericSetter< GetterFn, SetterFn > Class Template Referencefinal

This class can be used for tracking most instruction setters. More...

#include "llvm/SandboxIR/Tracker.h"

Inheritance diagram for llvm::sandboxir::GenericSetter< GetterFn, SetterFn >:
Inheritance graph
[legend]

Public Member Functions

 GenericSetter (InstrT *I)
 
void revert (Tracker &Tracker) final
 This runs when changes get reverted.
 
void accept () final
 This runs when changes get accepted.
 
void dump (raw_ostream &OS) const final
 
LLVM_DUMP_METHOD void dump () const final
 
- Public Member Functions inherited from llvm::sandboxir::IRChangeBase
virtual void revert (Tracker &Tracker)=0
 This runs when changes get reverted.
 
virtual void accept ()=0
 This runs when changes get accepted.
 
virtual ~IRChangeBase ()=default
 
virtual void dump (raw_ostream &OS) const =0
 
virtual LLVM_DUMP_METHOD void dump () const =0
 

Detailed Description

template<auto GetterFn, auto SetterFn>
class llvm::sandboxir::GenericSetter< GetterFn, SetterFn >

This class can be used for tracking most instruction setters.

The two template arguments are:

Example: Tracker.track(std::make_unique< GenericSetter<&FooInst::get, &FooInst::set>>(I, Tracker));

Definition at line 212 of file Tracker.h.

Constructor & Destructor Documentation

◆ GenericSetter()

template<auto GetterFn, auto SetterFn>
llvm::sandboxir::GenericSetter< GetterFn, SetterFn >::GenericSetter ( InstrT *  I)
inline

Definition at line 225 of file Tracker.h.

References I.

Member Function Documentation

◆ accept()

template<auto GetterFn, auto SetterFn>
void llvm::sandboxir::GenericSetter< GetterFn, SetterFn >::accept ( )
inlinefinalvirtual

This runs when changes get accepted.

Implements llvm::sandboxir::IRChangeBase.

Definition at line 227 of file Tracker.h.

◆ dump() [1/2]

template<auto GetterFn, auto SetterFn>
LLVM_DUMP_METHOD void llvm::sandboxir::GenericSetter< GetterFn, SetterFn >::dump ( ) const
inlinefinalvirtual

◆ dump() [2/2]

template<auto GetterFn, auto SetterFn>
void llvm::sandboxir::GenericSetter< GetterFn, SetterFn >::dump ( raw_ostream OS) const
inlinefinalvirtual

Implements llvm::sandboxir::IRChangeBase.

Definition at line 229 of file Tracker.h.

References OS.

◆ revert()

template<auto GetterFn, auto SetterFn>
void llvm::sandboxir::GenericSetter< GetterFn, SetterFn >::revert ( Tracker Tracker)
inlinefinalvirtual

This runs when changes get reverted.

Implements llvm::sandboxir::IRChangeBase.

Definition at line 226 of file Tracker.h.

References I.


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