|
| static std::optional< ExternInstance > | resolve (const IR::Expression *expr, ReferenceMap *refMap, TypeMap *typeMap, const std::optional< cstring > &defaultName=std::nullopt) |
| |
| static std::optional< ExternInstance > | resolve (const IR::PathExpression *path, ReferenceMap *refMap, TypeMap *typeMap) |
| |
|
- Returns
- the extern instance that @constructorCallExpr resolves to, if any, or std::nullopt otherwise.
Anonymous instances do not have a name, but the caller may provide one via
|
|
static std::optional< ExternInstance > | resolve (const IR::ConstructorCallExpression *constructorCallExpr, ReferenceMap *refMap, TypeMap *typeMap, const std::optional< cstring > &name=std::nullopt) |
| |
ExternInstance is a utility class that allows you to gather information about an expression that resolves to an extern instance.
The name is in analogy to MethodInstance. It provides information about the name of the extern instance, the underlying extern type, the arguments it was instantiated with, and the annotations that we applied to it. It can gather this information from either a reference to a named instance, or from an expression which constructs an anonymous instance.