mirror of
https://github.com/verilator/verilator.git
synced 2026-09-05 16:45:23 +02:00
Internals: Use pushDelete for empty unrolls. Theoretical problem only.
This commit is contained in:
+5
-5
@@ -404,11 +404,11 @@ private:
|
||||
// we'd need to initialize the variable to the initial
|
||||
// condition, but they'll become while's which can be
|
||||
// deleted by V3Const.
|
||||
nodep->unlinkFrBack()->deleteTree(); VL_DANGLING(nodep);
|
||||
} else if (forUnrollCheck(nodep, nodep->initsp(),
|
||||
NULL, nodep->condp(),
|
||||
nodep->incsp(), nodep->bodysp())) {
|
||||
pushDeletep(nodep); VL_DANGLING(nodep); // Did replacement
|
||||
pushDeletep(nodep->unlinkFrBack()); VL_DANGLING(nodep);
|
||||
} else if (forUnrollCheck(nodep, nodep->initsp(),
|
||||
NULL, nodep->condp(),
|
||||
nodep->incsp(), nodep->bodysp())) {
|
||||
pushDeletep(nodep); VL_DANGLING(nodep); // Did replacement
|
||||
} else {
|
||||
nodep->v3error("For loop doesn't have genvar index, or is malformed");
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user