From 413183bad88fdfe8e6a9cdd4984113d82d34ebd0 Mon Sep 17 00:00:00 2001 From: Wilson Snyder Date: Sun, 4 May 2025 21:25:44 -0400 Subject: [PATCH] Fix localize of coroutines (#5972 partial) --- src/V3Localize.cpp | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/src/V3Localize.cpp b/src/V3Localize.cpp index 5a1014a62..43f890110 100644 --- a/src/V3Localize.cpp +++ b/src/V3Localize.cpp @@ -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);