Disable Subst when not pure

This commit is contained in:
Wilson Snyder
2023-09-08 21:52:33 -04:00
parent 2f2f0164ff
commit cdd8953085
2 changed files with 5 additions and 2 deletions
+4 -1
View File
@@ -198,7 +198,10 @@ private:
}
}
void visit(AstConst*) override {} // Accelerate
void visit(AstNode* nodep) override { iterateChildren(nodep); }
void visit(AstNode* nodep) override {
if (!nodep->isPure()) m_ok = false;
iterateChildren(nodep);
}
public:
// CONSTRUCTORS