slang::ast::InstanceSymbolBase class

Common functionality for module, interface, program, and primitive instances.

Base classes

class Symbol
Base class for all symbols (logical code constructs) such as modules, types, functions, variables, etc.

Derived classes

class InstanceSymbol
Represents an instance of a module, interface, or program.

Public functions

auto getArrayName() const -> std::string_view
If this instance is part of an array, walk upward to find the array's name.
void getArrayDimensions(SmallVectorBase<ConstantRange>& dimensions) const
Gets the set of dimensions describing the instance array that contains this instance.

Function documentation

std::string_view slang::ast::InstanceSymbolBase::getArrayName() const

If this instance is part of an array, walk upward to find the array's name.

Otherwise returns the name of the instance itself.

void slang::ast::InstanceSymbolBase::getArrayDimensions(SmallVectorBase<ConstantRange>& dimensions) const

Gets the set of dimensions describing the instance array that contains this instance.

If this instance is not part of an array, does not add any dimensions to the given list.