Support soft foreach in constraint (#8174)

This commit is contained in:
Kamil Danecki
2026-08-26 11:05:12 -04:00
committed by GitHub
parent 7f9333723f
commit f055eeabe0
8 changed files with 172 additions and 2 deletions
+6
View File
@@ -298,6 +298,12 @@ class LinkParseVisitor final : public VNVisitor {
v3Global.useRandomizeMethods(true);
iterateChildren(nodep);
}
void visit(AstConstraintForeach* nodep) override {
if (nodep->isSoft()) {
nodep->v3warn(NONSTD, "Non-standard soft foreach");
nodep->foreach([](AstConstraintExpr* exprp) { exprp->isSoft(true); });
}
}
void visit(AstEnumDType* nodep) override {
if (nodep->name() == "") {
nodep->name(nameFromTypedef(nodep)); // Might still remain ""