Fix empty for blocks

git-svn-id: file://localhost/svn/verilator/trunk/verilator@888 77ca24e4-aefa-0310-84f0-b9a241c72d87
This commit is contained in:
Wilson Snyder
2007-02-27 14:30:22 +00:00
parent bec3daa79f
commit bd264006ef
3 changed files with 26 additions and 6 deletions
+6 -1
View File
@@ -252,7 +252,12 @@ private:
if (clonedIncsp) {
// Previous iteration of loop set the variable.
// This set is redundant with this next iteration and can be removed.
clonedIncsp->unlinkFrBack()->deleteTree();
if (clonedIncsp == newbodysp) { // Increment was only thing in list
newbodysp = NULL;
} else {
clonedIncsp->unlinkFrBack();
}
clonedIncsp->deleteTree();
}
clonedIncsp = incp->clonep(); if (!clonedIncsp) nodep->v3fatalSrc("inc failed");
}