17#ifndef FRONTENDS_P4_ENUMINSTANCE_H_
18#define FRONTENDS_P4_ENUMINSTANCE_H_
20#include "frontends/p4/typeMap.h"
22#include "methodInstance.h"
30 : name(name), type(type), typeMap(typeMap) {}
41 return typeMap->
equivalent(type, other->type) && name.name == other->name.name;
60 const IR::Expression *value;
Definition enumInstance.h:27
static EnumInstance * resolve(const IR::Expression *expression, const P4::TypeMap *typeMap)
Definition enumInstance.cpp:22
Definition methodInstance.h:27
Definition enumInstance.h:58
An instance of a simple enum, e.g., X.A from enum X { A, B }.
Definition enumInstance.h:48
bool equivalent(const IR::Type *left, const IR::Type *right, bool strict=false) const
Definition typeMap.cpp:140
TODO: this is not really specific to BMV2, it should reside somewhere else.
Definition applyOptionsPragmas.cpp:24