Use STATIC lifetime for variables created from clocking items (#4262)

Signed-off-by: Krzysztof Boronski <kboronski@antmicro.com>
This commit is contained in:
Krzysztof Boroński 2023-06-01 17:49:27 +02:00 committed by GitHub
parent db7935faf3
commit 0e24f36fef
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 1 additions and 0 deletions

View File

@ -1174,6 +1174,7 @@ class LinkDotFindVisitor final : public VNVisitor {
}
AstVar* const newvarp = new AstVar{nodep->fileline(), VVarType::MODULETEMP, varname,
VFlagChildDType{}, dtypep};
newvarp->lifetime(VLifetime::STATIC);
nodep->varp(newvarp);
iterate(nodep->exprp());
}