mirror of
https://github.com/verilator/verilator.git
synced 2025-01-08 23:57:35 +00:00
Give iterated variables in foreach loops VAUTOM lifetimes (#4265)
Signed-off-by: Krzysztof Boronski <kboronski@antmicro.com>
This commit is contained in:
parent
0e24f36fef
commit
545caba720
@ -4680,6 +4680,7 @@ private:
|
||||
FileLine* const fl = varp->fileline();
|
||||
auto* const whilep = new AstWhile{
|
||||
fl, condp, bodysp, new AstAssign{fl, new AstVarRef{fl, varp, VAccess::WRITE}, incp}};
|
||||
varp->lifetime(VLifetime::AUTOMATIC);
|
||||
AstNode* const stmtsp = varp; // New statements for under new Begin
|
||||
stmtsp->addNext(new AstAssign{fl, new AstVarRef{fl, varp, VAccess::WRITE}, leftp});
|
||||
stmtsp->addNext(whilep);
|
||||
|
Loading…
Reference in New Issue
Block a user