Fix localize of coroutines (#5972 partial)

This commit is contained in:
Wilson Snyder 2025-05-04 21:25:44 -04:00
parent 11cfa61f80
commit 413183bad8
1 changed files with 5 additions and 0 deletions

View File

@ -132,6 +132,11 @@ class LocalizeVisitor final : public VNVisitor {
moveVarScopes();
}
void visit(AstCAwait* nodep) override {
m_cfuncp->user1(true); // Mark caller as not a leaf function
iterateChildrenConst(nodep);
}
void visit(AstCFunc* nodep) override {
UINFO(4, " CFUNC " << nodep << endl);
VL_RESTORER(m_cfuncp);