17#ifndef MIDEND_ELIMINATESWITCH_H_
18#define MIDEND_ELIMINATESWITCH_H_
20#include "frontends/p4/typeChecking/typeChecker.h"
80 std::vector<const IR::Declaration *> toInsert;
83 bool exactNeeded =
false;
86 : refMap(refMap), typeMap(typeMap) {
87 setName(
"DoEliminateSwitch");
91 const IR::Node *postorder(IR::SwitchStatement *statement)
override;
92 const IR::Node *postorder(IR::P4Control *control)
override;
93 const IR::Node *postorder(IR::P4Program *program)
override;
96class EliminateSwitch final :
public PassManager {
99 if (!typeChecking) typeChecking =
new TypeChecking(refMap, typeMap);
100 passes.push_back(typeChecking);
103 setName(
"EliminateSwitch");
Definition typeChecker.h:32
Definition eliminateSwitch.h:77
Class used to encode maps from paths to declarations.
Definition referenceMap.h:66
Definition typeChecker.h:55
TODO: this is not really specific to BMV2, it should reside somewhere else.
Definition applyOptionsPragmas.cpp:24