P4C
The P4 Compiler
|
Class used to encode maps from paths to declarations. More...
#include <referenceMap.h>
Public Member Functions | |
void | clear () |
Clear the reference map. | |
void | dbprint (std::ostream &cout) const override |
const IR::IDeclaration * | getDeclaration (const IR::Path *path, bool notNull=false) const override |
const IR::IDeclaration * | getDeclaration (const IR::This *pointer, bool notNull=false) const override |
bool | isUsed (const IR::IDeclaration *decl) const |
bool | isV1 () const |
cstring | newName (std::string_view base) override |
Generate a name from base that fresh for the program. | |
void | setAnyOrder (bool anyOrder) |
void | setDeclaration (const IR::Path *path, const IR::IDeclaration *decl) |
Sets declaration for path to decl . | |
void | setDeclaration (const IR::This *pointer, const IR::IDeclaration *decl) |
Sets declaration for pointer to decl . | |
void | setIsV1 (bool isv1) |
Set boolean indicating whether map is for a P4_14 program to isV1 . | |
void | usedName (cstring name) |
Indicate that name is used in the program. | |
Public Member Functions inherited from P4::ProgramMap | |
bool | checkMap (const IR::Node *node) const |
void | clear () |
void | updateMap (const IR::Node *node) |
void | validateMap (const IR::Node *node) const |
Public Member Functions inherited from P4::IHasDbPrint | |
void | print () const |
Public Member Functions inherited from P4::NameGenerator | |
Public Member Functions inherited from P4::DeclarationLookup |
Additional Inherited Members | |
Protected Member Functions inherited from P4::ProgramMap | |
ProgramMap (std::string_view kind) | |
Protected Attributes inherited from P4::ProgramMap | |
const IR::P4Program * | fake = new IR::P4Program() |
cstring | mapKind |
const IR::P4Program * | program = nullptr |
Class used to encode maps from paths to declarations.
|
overridevirtual |
Implements P4::IHasDbPrint.
|
overridevirtual |
Looks up declaration for path
. If notNull
is false, then failure to find a declaration is an error.
Implements P4::DeclarationLookup.
|
overridevirtual |
Looks up declaration for pointer
. If notNull
is false, then failure to find a declaration is an error.
Implements P4::DeclarationLookup.
|
inline |
decl
is used in the program.
|
inline |
|
overridevirtual |
Generate a name from base
that fresh for the program.
Implements P4::NameGenerator.