55 std::unordered_map<std::pair<const IR::Node *, cstring>,
bool> annNames;
57 void container(
const IR::IContainer *type);
59 void distinctParameters(
const IR::TypeParameters *typeParams,
const IR::ParameterList *apply,
60 const IR::ParameterList *constr);
64 void end_apply(
const IR::Node *)
override { annNames.clear(); }
65 void postorder(
const IR::Annotation *annotations)
override;
66 void postorder(
const IR::P4Program *program)
override;
67 void postorder(
const IR::Constant *c)
override;
68 void postorder(
const IR::SwitchStatement *statement)
override;
69 void postorder(
const IR::Method *t)
override;
70 void postorder(
const IR::StructField *f)
override;
71 void postorder(
const IR::ParserState *s)
override;
72 void postorder(
const IR::P4Table *t)
override;
73 void postorder(
const IR::Type_Bits *type)
override;
74 void postorder(
const IR::Type_Varbits *type)
override;
75 void postorder(
const IR::ConstructorCallExpression *expression)
override;
76 void postorder(
const IR::Declaration_Variable *decl)
override;
77 void postorder(
const IR::Declaration_Instance *inst)
override;
78 void postorder(
const IR::Declaration_Constant *decl)
override;
79 void postorder(
const IR::EntriesList *l)
override;
80 void postorder(
const IR::ReturnStatement *statement)
override;
81 void postorder(
const IR::ExitStatement *statement)
override;
82 void postorder(
const IR::Type_Package *package)
override { container(package); }
83 void postorder(
const IR::P4Control *control)
override {
85 distinctParameters(control->getTypeParameters(), control->getApplyParameters(),
86 control->getConstructorParameters());
88 void postorder(
const IR::P4Parser *parser)
override {
89 auto start = parser->states.getDeclaration(IR::ParserState::start);
91 ::P4::error(ErrorType::ERR_INVALID,
"Parser %1% has no 'start' state", parser);
94 distinctParameters(parser->getTypeParameters(), parser->getApplyParameters(),
95 parser->getConstructorParameters());
97 void postorder(
const IR::Dots *dots)
override;
98 void postorder(
const IR::BreakStatement *s)
override;
99 void postorder(
const IR::ContinueStatement *s)
override;
TODO: this is not really specific to BMV2, it should reside somewhere else.
Definition applyOptionsPragmas.cpp:24
void error(const char *format, Args &&...args)
Report an error with the given message.
Definition lib/error.h:51