17#ifndef MIDEND_COPYSTRUCTURES_H_
18#define MIDEND_COPYSTRUCTURES_H_
20#include "frontends/p4/typeChecking/typeChecker.h"
61 bool errorOnMethodCall;
68 : typeMap(typeMap), errorOnMethodCall(errorOnMethodCall), copyHeaders(copyHeaders) {
70 setName(
"DoCopyStructures");
72 const IR::Node *postorder(IR::AssignmentStatement *statement)
override;
104 setName(
"RemoveAliases");
107 const IR::Node *postorder(IR::AssignmentStatement *statement)
override;
108 const IR::Node *postorder(IR::P4Parser *parser)
override;
109 const IR::Node *postorder(IR::P4Control *control)
override;
115 bool copyHeaders =
false,
TypeChecking *typeChecking =
nullptr)
119 setName(
"CopyStructures");
120 if (typeChecking ==
nullptr) {
123 passes.emplace_back(typeChecking);
125 passes.emplace_back(typeChecking);
126 passes.emplace_back(
new DoCopyStructures(typeMap, errorOnMethodCall, copyHeaders));
Definition copyStructures.h:112
Definition copyStructures.h:55
Class used to encode maps from paths to declarations.
Definition referenceMap.h:66
Definition copyStructures.h:94
Definition typeChecker.h:55
Definition pass_manager.h:38
Definition pass_manager.h:143
TODO: this is not really specific to BMV2, it should reside somewhere else.
Definition applyOptionsPragmas.cpp:24