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
+2 -2
View File
@@ -710,8 +710,8 @@ class CoverageVisitor final : public VNVisitor {
UINFO(4, " STOP: " << nodep);
m_state.m_on = false;
}
void visit(AstPragma* nodep) override {
if (nodep->pragType() == VPragmaType::COVERAGE_BLOCK_OFF) {
void visit(AstStmtPragma* nodep) override {
if (nodep->pragp()->pragType() == VPragmaType::COVERAGE_BLOCK_OFF) {
// Skip all NEXT nodes under this block, and skip this if/case branch
UINFO(4, " OFF: h" << m_state.m_handle << " " << nodep);
m_state.m_on = false;