mirror of
https://github.com/verilator/verilator.git
synced 2026-10-06 01:54:01 +02:00
@@ -5345,6 +5345,20 @@ class LinkDotResolveVisitor final : public VNVisitor {
|
||||
nodep->typedefp(defp);
|
||||
nodep->classOrPackagep(foundp->classOrPackagep());
|
||||
resolvedCapturedTypedef = true;
|
||||
|
||||
// class capture: capture typedef references inside parameterized classes
|
||||
// Only capture if we're referencing from OUTSIDE the class (not
|
||||
// self-references)
|
||||
if (m_statep->forPrimary()) {
|
||||
AstClass* const classp = VN_CAST(nodep->classOrPackagep(), Class);
|
||||
if (classp && classp->hasGParam() && classp != m_modp) {
|
||||
UINFO(9, indent()
|
||||
<< "class capture add typedef name=" << nodep->name()
|
||||
<< " class=" << classp->name() << " typedef=" << defp);
|
||||
V3LinkDotIfaceCapture::addClass(nodep, classp, m_modp, defp);
|
||||
}
|
||||
}
|
||||
|
||||
} else if (AstParamTypeDType* const defp
|
||||
= foundp ? VN_CAST(foundp->nodep(), ParamTypeDType) : nullptr) {
|
||||
if (defp == nodep->backp()) { // Where backp is typically typedef
|
||||
|
||||
Reference in New Issue
Block a user