CIRCT  19.0.0git
Public Member Functions | Public Attributes | Private Member Functions | Private Attributes | List of all members
circt::ExportVerilog::NameCollisionResolver Struct Reference

#include <ExportVerilogInternals.h>

Collaboration diagram for circt::ExportVerilog::NameCollisionResolver:
Collaboration graph
[legend]

Public Member Functions

 NameCollisionResolver (const LoweringOptions &options)
 
StringRef getLegalName (StringRef originalName)
 Given a name that may have collisions or invalid symbols, return a replacement name to use, or the original name if it was ok. More...
 
StringRef getLegalName (StringAttr originalName)
 
void insertUsedName (StringRef name)
 Insert a string as an already-used name. More...
 

Public Attributes

const LoweringOptionsoptions
 Handle to LoweringOptions. More...
 

Private Member Functions

 NameCollisionResolver (const NameCollisionResolver &)=delete
 
void operator= (const NameCollisionResolver &)=delete
 

Private Attributes

llvm::StringMap< size_t > nextGeneratedNameIDs
 A map from used names to numeric suffix used as uniquification agent when resolving conflicts. More...
 

Detailed Description

Definition at line 85 of file ExportVerilogInternals.h.

Constructor & Destructor Documentation

◆ NameCollisionResolver() [1/2]

circt::ExportVerilog::NameCollisionResolver::NameCollisionResolver ( const LoweringOptions options)
inline

Definition at line 86 of file ExportVerilogInternals.h.

◆ NameCollisionResolver() [2/2]

circt::ExportVerilog::NameCollisionResolver::NameCollisionResolver ( const NameCollisionResolver )
privatedelete

Member Function Documentation

◆ getLegalName() [1/2]

StringRef circt::ExportVerilog::NameCollisionResolver::getLegalName ( StringAttr  originalName)
inline

Definition at line 91 of file ExportVerilogInternals.h.

References getLegalName().

◆ getLegalName() [2/2]

StringRef NameCollisionResolver::getLegalName ( StringRef  originalName)

Given a name that may have collisions or invalid symbols, return a replacement name to use, or the original name if it was ok.

Given a name that may have collisions or invalid symbols, return a replacement name to use, or null if the original name was ok.

Definition at line 33 of file LegalizeNames.cpp.

References circt::sv::legalizeName().

Referenced by getLegalName(), circt::ExportVerilog::GlobalNameResolver::legalizeInterfaceNames(), legalizeModuleLocalNames(), and circt::ExportVerilog::GlobalNameResolver::legalizeModuleNames().

◆ insertUsedName()

void circt::ExportVerilog::NameCollisionResolver::insertUsedName ( StringRef  name)
inline

Insert a string as an already-used name.

Definition at line 96 of file ExportVerilogInternals.h.

References nextGeneratedNameIDs.

Referenced by circt::ExportVerilog::GlobalNameResolver::GlobalNameResolver(), and legalizeModuleLocalNames().

◆ operator=()

void circt::ExportVerilog::NameCollisionResolver::operator= ( const NameCollisionResolver )
privatedelete

Member Data Documentation

◆ nextGeneratedNameIDs

llvm::StringMap<size_t> circt::ExportVerilog::NameCollisionResolver::nextGeneratedNameIDs
private

A map from used names to numeric suffix used as uniquification agent when resolving conflicts.

Definition at line 106 of file ExportVerilogInternals.h.

Referenced by insertUsedName().

◆ options

const LoweringOptions& circt::ExportVerilog::NameCollisionResolver::options

Handle to LoweringOptions.

Definition at line 101 of file ExportVerilogInternals.h.


The documentation for this struct was generated from the following files: