Internals: Add AstStmtPragma (#6280)

Trivial adaptor node to put AstPragma in AstNodeStmt position, which
will be required in various places. Also fix dumping of AstPragma.
This commit is contained in:
Geza Lore
2025-10-22 18:51:11 +01:00
parent 43373010dc
commit 5ac345e09c
11 changed files with 81 additions and 25 deletions
+3 -3
View File
@@ -267,11 +267,11 @@ class LinkJumpVisitor final : public VNVisitor {
}
m_blockStack.pop_back();
}
void visit(AstPragma* nodep) override {
if (nodep->pragType() == VPragmaType::UNROLL_DISABLE) {
void visit(AstStmtPragma* nodep) override {
if (nodep->pragp()->pragType() == VPragmaType::UNROLL_DISABLE) {
m_unrollFull = VOptionBool::OPT_FALSE;
VL_DO_DANGLING(pushDeletep(nodep->unlinkFrBack()), nodep);
} else if (nodep->pragType() == VPragmaType::UNROLL_FULL) {
} else if (nodep->pragp()->pragType() == VPragmaType::UNROLL_FULL) {
m_unrollFull = VOptionBool::OPT_TRUE;
VL_DO_DANGLING(pushDeletep(nodep->unlinkFrBack()), nodep);
} else {