LLVM 20.0.0git
|
This class can be used for tracking most instruction setters. More...
#include "llvm/SandboxIR/Tracker.h"
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 |
This class can be used for tracking most instruction setters.
The two template arguments are:
&Foo::get
)&Foo::set
) Upon construction, it saves a copy of the original value by calling the getter function. Revert sets the value back to the one saved, using the setter function provided.Example: Tracker.track(std::make_unique< GenericSetter<&FooInst::get, &FooInst::set>>(I, Tracker));
|
inline |
|
inlinefinalvirtual |
This runs when changes get accepted.
Implements llvm::sandboxir::IRChangeBase.
|
inlinefinalvirtual |
Implements llvm::sandboxir::IRChangeBase.
Definition at line 229 of file Tracker.h.
References llvm::dbgs(), and llvm::sandboxir::GenericSetter< GetterFn, SetterFn >::dump().
Referenced by llvm::sandboxir::GenericSetter< GetterFn, SetterFn >::dump().
|
inlinefinalvirtual |
|
inlinefinalvirtual |
This runs when changes get reverted.
Implements llvm::sandboxir::IRChangeBase.
Definition at line 225 of file Tracker.h.
References I.