Class used to encode maps from paths to declarations.
More...
#include <referenceMap.h>
|
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.
|
|
bool | checkMap (const IR::Node *node) const |
|
void | clear () |
|
void | updateMap (const IR::Node *node) |
|
void | validateMap (const IR::Node *node) const |
|
void | print () const |
|
|
| ProgramMap (std::string_view kind) |
|
const IR::P4Program * | fake = new IR::P4Program() |
|
cstring | mapKind |
|
const IR::P4Program * | program = nullptr |
|
Class used to encode maps from paths to declarations.
◆ dbprint()
void P4::ReferenceMap::dbprint |
( |
std::ostream & | cout | ) |
const |
|
overridevirtual |
◆ getDeclaration() [1/2]
const IR::IDeclaration * P4::ReferenceMap::getDeclaration |
( |
const IR::Path * | path, |
|
|
bool | notNull = false ) const |
|
overridevirtual |
Looks up declaration for path
. If notNull
is false, then failure to find a declaration is an error.
Implements P4::DeclarationLookup.
◆ getDeclaration() [2/2]
const IR::IDeclaration * P4::ReferenceMap::getDeclaration |
( |
const IR::This * | pointer, |
|
|
bool | notNull = false ) const |
|
overridevirtual |
Looks up declaration for pointer
. If notNull
is false, then failure to find a declaration is an error.
Implements P4::DeclarationLookup.
◆ isUsed()
bool P4::ReferenceMap::isUsed |
( |
const IR::IDeclaration * | decl | ) |
const |
|
inline |
- Returns
- @true if
decl
is used in the program.
◆ isV1()
bool P4::ReferenceMap::isV1 |
( |
| ) |
const |
|
inline |
- Returns
- @true if this map is for a P4_14 program
◆ newName()
cstring P4::ReferenceMap::newName |
( |
std::string_view | base | ) |
|
|
overridevirtual |