LLVM: llvm::sandboxir::IRSnapshotChecker Class Reference (original) (raw)
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](Tracker%5F8h%5Fsource.html)"
| Public Member Functions | |
|---|---|
| IRSnapshotChecker (Context &Ctx) | |
| LLVM_ABI_FOR_TEST void | save () |
| Saves a snapshot of the current state. | |
| LLVM_ABI_FOR_TEST 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.
Definition at line 79 of file Tracker.h.
| llvm::sandboxir::IRSnapshotChecker::IRSnapshotChecker ( Context & Ctx) | inline |
|---|
◆ expectNoDiff()
| void IRSnapshotChecker::expectNoDiff | ( | ) |
|---|
◆ save()
| 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 70 of file Tracker.cpp.
The documentation for this class was generated from the following files:
- include/llvm/SandboxIR/Tracker.h
- lib/SandboxIR/Tracker.cpp