mirror of
https://github.com/verilator/verilator.git
synced 2026-09-02 10:48:27 +02:00
Internals: Rewrite skipRefp to avoid recursion and fix const-ness. No functional change intended.
This commit is contained in:
+2
-2
@@ -208,7 +208,7 @@ class ClassVisitor final : public VNVisitor {
|
||||
m_names.get(dtypep->name() + (VN_IS(dtypep, UnionDType) ? "__union" : "__struct")));
|
||||
if (dtypep->packed()) m_strDtypeps.insert(dtypep);
|
||||
|
||||
for (const AstMemberDType* itemp = dtypep->membersp(); itemp;
|
||||
for (AstMemberDType* itemp = dtypep->membersp(); itemp;
|
||||
itemp = VN_AS(itemp->nextp(), MemberDType)) {
|
||||
AstNodeUOrStructDType* const subp = itemp->getChildStructp();
|
||||
// Recurse only into anonymous structs inside this definition,
|
||||
@@ -271,7 +271,7 @@ public:
|
||||
AstNodeUOrStructDType* const dtypep = m_pubStrDtypeps.front();
|
||||
m_pubStrDtypeps.pop();
|
||||
if (pubStrDtypeps.insert(dtypep).second) {
|
||||
for (const AstMemberDType* itemp = dtypep->membersp(); itemp;
|
||||
for (AstMemberDType* itemp = dtypep->membersp(); itemp;
|
||||
itemp = VN_AS(itemp->nextp(), MemberDType)) {
|
||||
if (AstNodeUOrStructDType* const subp = itemp->getChildStructp())
|
||||
m_pubStrDtypeps.push(subp);
|
||||
|
||||
Reference in New Issue
Block a user