LLVM 20.0.0git
|
A class that saves hashes and textual IR snapshots of functions in a SandboxIR Context, and does hash comparison when expectNoDiff
is called.
More...
#include "llvm/SandboxIR/Tracker.h"
Public Member Functions | |
IRSnapshotChecker (Context &Ctx) | |
void | save () |
Saves a snapshot of the current state. | |
void | expectNoDiff () |
Checks current state against saved state, crashes if different. | |
A class that saves hashes and textual IR snapshots of functions in a SandboxIR Context, and does hash comparison when expectNoDiff
is called.
If hashes differ, it prints textual IR for both old and new versions to aid debugging.
This is used as an additional debug check when reverting changes to SandboxIR, to verify the reverted state matches the initial state.
|
inline |
void IRSnapshotChecker::expectNoDiff | ( | ) |
Checks current state against saved state, crashes if different.
Definition at line 74 of file Tracker.cpp.
References llvm_unreachable.
Referenced by llvm::sandboxir::Tracker::revert().
void IRSnapshotChecker::save | ( | ) |
Saves a snapshot of the current state.
If there was any previous snapshot, it will be replaced with the new one.
Definition at line 72 of file Tracker.cpp.
Referenced by llvm::sandboxir::Tracker::save().