Internals: Style cleanup. Ignore whitespace if diff. No functional change.

This commit is contained in:
Wilson Snyder
2024-11-10 10:59:18 -05:00
parent 77ef2cd487
commit a68da7e220
22 changed files with 285 additions and 402 deletions
+24 -28
View File
@@ -149,32 +149,30 @@ class ScopeVisitor final : public VNVisitor {
VL_RESTORER(m_aboveCellp);
VL_RESTORER(m_aboveScopep);
VL_RESTORER(m_modp);
{
m_aboveScopep = m_scopep;
m_modp = nodep;
m_aboveScopep = m_scopep;
m_modp = nodep;
string scopename;
if (!m_aboveScopep) {
scopename = "TOP";
} else {
scopename = m_aboveScopep->name() + "." + nodep->name();
}
UINFO(4, " CLASS AT " << scopename << " " << nodep << endl);
AstNode::user1ClearTree();
const AstNode* const abovep = (m_aboveCellp ? static_cast<AstNode*>(m_aboveCellp)
: static_cast<AstNode*>(nodep));
m_scopep
= new AstScope{abovep->fileline(), m_modp, scopename, m_aboveScopep, m_aboveCellp};
m_packageScopes.emplace(nodep, m_scopep);
// Create scope for the current usage of this cell
AstNode::user1ClearTree();
nodep->addMembersp(m_scopep);
iterateChildren(nodep);
string scopename;
if (!m_aboveScopep) {
scopename = "TOP";
} else {
scopename = m_aboveScopep->name() + "." + nodep->name();
}
UINFO(4, " CLASS AT " << scopename << " " << nodep << endl);
AstNode::user1ClearTree();
const AstNode* const abovep
= (m_aboveCellp ? static_cast<AstNode*>(m_aboveCellp) : static_cast<AstNode*>(nodep));
m_scopep
= new AstScope{abovep->fileline(), m_modp, scopename, m_aboveScopep, m_aboveCellp};
m_packageScopes.emplace(nodep, m_scopep);
// Create scope for the current usage of this cell
AstNode::user1ClearTree();
nodep->addMembersp(m_scopep);
iterateChildren(nodep);
}
void visit(AstCellInline* nodep) override { //
if (v3Global.opt.vpi()) {
@@ -334,10 +332,8 @@ class ScopeCleanupVisitor final : public VNVisitor {
void visit(AstScope* nodep) override {
// Want to ignore blocks under it
VL_RESTORER(m_scopep);
{
m_scopep = nodep;
iterateChildren(nodep);
}
m_scopep = nodep;
iterateChildren(nodep);
}
virtual void movedDeleteOrIterate(AstNode* nodep) {