mirror of
https://github.com/verilator/verilator.git
synced 2026-09-03 16:28:53 +02:00
Fix VL_TO_STRING function for array of structs (#7912)
Signed-off-by: Kornel Uriasz <[email protected]>
This commit is contained in:
+7
-1
@@ -6680,7 +6680,13 @@ class WidthVisitor final : public VNVisitor {
|
||||
} else if (dtypep->isString()) {
|
||||
formatAttr = VFormatAttr::STRING;
|
||||
} else if (isFormatNonNumericArg(dtypep)) {
|
||||
if (AstVarRef* const varRefp = VN_CAST(argp, VarRef)) {
|
||||
const AstNodeExpr* formatTypeArgp = argp;
|
||||
if (const AstCMethodHard* const cmethp = VN_CAST(formatTypeArgp, CMethodHard)) {
|
||||
if (cmethp->method() == VCMethod::ARRAY_AT) formatTypeArgp = cmethp->fromp();
|
||||
} else if (const AstArraySel* const arselp = VN_CAST(formatTypeArgp, ArraySel)) {
|
||||
formatTypeArgp = arselp->fromp();
|
||||
}
|
||||
if (const AstVarRef* const varRefp = VN_CAST(formatTypeArgp, VarRef)) {
|
||||
if (AstClassRefDType* const classRefp
|
||||
= VN_CAST(varRefp->dtypep(), ClassRefDType)) {
|
||||
if (classRefp->classp()) {
|
||||
|
||||
Reference in New Issue
Block a user