P4C
The P4 Compiler
Loading...
Searching...
No Matches
P4::RenameMap Class Reference

Public Member Functions

const IR::P4Action * actionCalled (const IR::MethodCallExpression *expression) const
 
void foundInTable (const IR::P4Action *action)
 
std::optional< cstringget (const IR::IDeclaration *decl) const
 Get new name for the declaration (wrapped in optional), or std::nullopt if there is none.
 
cstring getName (const IR::IDeclaration *decl) const
 Get new name for the declaration, fails if none exists.
 
void markActionCall (const IR::P4Action *action, const IR::MethodCallExpression *call)
 
void setNewName (const IR::IDeclaration *decl, cstring name, bool allowOverride=false)
 Add rename entry for the declaration to be named with the given name.
 
bool toRename (const IR::IDeclaration *decl) const
 

Member Function Documentation

◆ setNewName()

void P4::RenameMap::setNewName ( const IR::IDeclaration * decl,
cstring name,
bool allowOverride = false )

Add rename entry for the declaration to be named with the given name.

Parameters
allowOverrideIf set to true, don't fail if a new name was already set but replace it instead.

◆ toRename()

bool P4::RenameMap::toRename ( const IR::IDeclaration * decl) const
inline
Returns
true if there is a new name for the declaration, false otherwise.