diff --git a/src/V3Ast.h b/src/V3Ast.h index 868fc73f8..3b9c88a39 100644 --- a/src/V3Ast.h +++ b/src/V3Ast.h @@ -1787,7 +1787,6 @@ public: void deleteTree(); // Always deletes the next link void checkTree(); // User Interface version void checkIter() const; - void clearIter() { m_iterpp = nullptr; } void dumpPtrs(std::ostream& os = std::cout) const; void dumpTree(std::ostream& os = std::cout, const string& indent = " ", int maxDepth = 0) const; diff --git a/src/V3LinkLevel.cpp b/src/V3LinkLevel.cpp index be8706477..d96892762 100644 --- a/src/V3LinkLevel.cpp +++ b/src/V3LinkLevel.cpp @@ -73,11 +73,7 @@ void V3LinkLevel::modSortByLevel() { // Reorder the netlist's modules to have modules in level sorted order stable_sort(mods.begin(), mods.end(), CmpLevel()); // Sort the vector UINFO(9, "modSortByLevel() sorted\n"); // Comment required for gcc4.6.3 / bug666 - for (AstNodeModule* nodep : mods) { - nodep->clearIter(); // Because we didn't iterate to find the node - // pointers, may have a stale m_iterp() needing cleanup - nodep->unlinkFrBack(); - } + for (AstNodeModule* nodep : mods) nodep->unlinkFrBack(); UASSERT_OBJ(!v3Global.rootp()->modulesp(), v3Global.rootp(), "Unlink didn't work"); for (AstNodeModule* nodep : mods) v3Global.rootp()->addModulep(nodep); UINFO(9, "modSortByLevel() done\n"); // Comment required for gcc4.6.3 / bug666