17#ifndef BACKENDS_P4TEST_MIDEND_H_
18#define BACKENDS_P4TEST_MIDEND_H_
20#include "frontends/common/options.h"
21#include "frontends/p4/evaluator/evaluator.h"
27 std::vector<DebugHook> hooks;
32 IR::ToplevelBlock *toplevel =
nullptr;
34 void addDebugHook(
DebugHook hook) { hooks.push_back(hook); }
36 IR::ToplevelBlock *process(
const IR::P4Program *&program) {
37 addDebugHooks(hooks,
true);
38 program = program->apply(*
this);
Definition frontends/common/options.h:30
Definition p4test/midend.h:26
Definition ir/pass_manager.h:40
Class used to encode maps from paths to declarations.
Definition referenceMap.h:66
std::function< void(const char *manager, unsigned seqNo, const char *pass, const IR::Node *node)> DebugHook
Definition ir/pass_manager.h:38