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;
103 setName(
"RemoveAliases");
106 auto rv = Transform::init_apply(node);
107 node->apply(nameGen);
112 const IR::Node *postorder(IR::AssignmentStatement *statement)
override;
113 const IR::Node *postorder(IR::P4Parser *parser)
override;
114 const IR::Node *postorder(IR::P4Control *control)
override;
120 bool copyHeaders =
false,
TypeChecking *typeChecking =
nullptr) {
122 setName(
"CopyStructures");
123 if (typeChecking ==
nullptr) typeChecking =
new TypeChecking(
nullptr, typeMap);
124 passes.emplace_back(typeChecking);
126 passes.emplace_back(typeChecking);
127 passes.emplace_back(
new DoCopyStructures(typeMap, errorOnMethodCall, copyHeaders));
Definition copyStructures.h:117
Definition copyStructures.h:55
Definition referenceMap.h:36
Definition ir/pass_manager.h:145
Definition copyStructures.h:94
Definition typeChecker.h:55
TODO: this is not really specific to BMV2, it should reside somewhere else.
Definition applyOptionsPragmas.cpp:24