mirror of
https://github.com/verilator/verilator.git
synced 2026-10-06 01:54:01 +02:00
Internals: clean up begin blocks and lifetimes in foreach loops (#5306)
According to IEEE 1800-2023 12.7.3, the loop creates an implicit block around it, containing declarations of the loop variables with automatic lifetime. No functional change intended. Signed-off-by: Arkadiusz Kozdra <[email protected]>
This commit is contained in:
@@ -1487,6 +1487,7 @@ class LinkDotFindVisitor final : public VNVisitor {
|
||||
// We use an int type, this might get changed in V3Width when types resolve
|
||||
argrefp = new AstVar{parserefp->fileline(), VVarType::BLOCKTEMP,
|
||||
parserefp->name(), argp->findSigned32DType()};
|
||||
argrefp->lifetime(VLifetime::AUTOMATIC);
|
||||
parserefp->replaceWith(argrefp);
|
||||
VL_DO_DANGLING(parserefp->deleteTree(), parserefp);
|
||||
// Insert argref's name into symbol table
|
||||
|
||||
Reference in New Issue
Block a user