P4C
The P4 Compiler
All Classes Namespaces Functions Variables Typedefs Enumerations Enumerator Friends Modules Pages
P4::TypeSpecialization Struct Reference
Inheritance diagram for P4::TypeSpecialization:
[legend]

Public Member Functions

 TypeSpecialization (cstring name, const IR::Type_Specialized *specialized, const IR::Type_Declaration *decl, const InsertionSet &insertion, const IR::Vector< IR::Type > *argTypes)
 
void dbprint (std::ostream &out) const override
 
- Public Member Functions inherited from P4::IHasDbPrint
void print () const
 

Public Attributes

const IR::Vector< IR::Type > * argumentTypes
 
const IR::Type_Declaration * declaration
 Declaration of specialized type, which will be replaced.
 
bool inserted = false
 was this specialization already inserted?
 
InsertionSet insertion
 
cstring name
 Name to use for specialized type.
 
const IR::Type_StructLike * replacement
 New synthesized type (created later)
 
const IR::Type_Specialized * specialized
 Type that is being specialized.
 

Member Function Documentation

◆ dbprint()

void P4::TypeSpecialization::dbprint ( std::ostream & out) const
inlineoverridevirtual

Implements P4::IHasDbPrint.

Member Data Documentation

◆ argumentTypes

const IR::Vector<IR::Type>* P4::TypeSpecialization::argumentTypes

Save here the canonical types of the type arguments of 'specialized'. The typeMap will be cleared, so we cannot look them up later.

◆ insertion

InsertionSet P4::TypeSpecialization::insertion

Insertion point, the specialization will be inserted after all the top-level nodes in this set.