67 auto handleUserInput = [&]() ->
bool {
68 if (!onBreakpointControlExecutionCallback)
70 auto todoNext = onBreakpointControlExecutionCallback(
actionStack);
73 depthToBreak = std::nullopt;
76 depthToBreak = std::nullopt;
79 depthToBreak = depth + 1;
85 depthToBreak = depth - 1;
88 llvm::report_fatal_error(
"Unknown control request");
93 for (
auto *breakpointManager : breakpoints) {
94 breakpoint = breakpointManager->match(action);
100 bool shouldExecuteAction =
true;
103 if (breakpoint || (depthToBreak && depth <= depthToBreak))
104 shouldExecuteAction = handleUserInput();
107 for (
auto *observer : observers)
108 observer->beforeExecute(
actionStack, breakpoint, shouldExecuteAction);
110 if (shouldExecuteAction) {
115 for (
auto *observer : observers)
119 if (depthToBreak && depth <= depthToBreak)
static const LLVM_THREAD_LOCAL ActionActiveStack * actionStack
void registerObserver(Observer *observer)
Register a new Observer on this context.
void operator()(function_ref< void()> transform, const Action &action)
Process the given action.
This abstract class defines the interface used to observe an Action execution.