Fix prettyName in structure dumps, partial (#4001)

This commit is contained in:
Wilson Snyder 2023-03-03 18:49:26 -05:00
parent 1e28387541
commit 3fc684359a
2 changed files with 3 additions and 1 deletions

View File

@ -1392,6 +1392,7 @@ public:
const char* broken() const override;
void dump(std::ostream& str) const override;
string name() const override { return m_name; }
void name(const string& name) override { m_name = name; }
string emitVerilog() override { V3ERROR_NA_RETURN(""); }
string emitC() override { V3ERROR_NA_RETURN(""); }
bool cleanOut() const override { return false; }
@ -1850,6 +1851,7 @@ public:
}
ASTGEN_MEMBERS_AstStructSel;
string name() const override { return m_name; }
void name(const string& name) override { m_name = name; }
string emitVerilog() override { V3ERROR_NA_RETURN(""); }
string emitC() override { V3ERROR_NA_RETURN(""); }
bool cleanOut() const override { return false; }

View File

@ -79,7 +79,7 @@ static void makeVlToString(AstNodeUOrStructDType* nodep) {
} else {
stmt += ", ";
}
stmt += itemp->nameProtect() + ":\" + ";
stmt += VIdProtect::protect(itemp->prettyName()) + ":\" + ";
if (VN_IS(itemp->dtypep()->skipRefp(), BasicDType) && itemp->isWide()) {
stmt += "VL_TO_STRING_W";
} else {