diff --git a/src/V3Ast.cpp b/src/V3Ast.cpp index a51828d20..f135d5fcc 100644 --- a/src/V3Ast.cpp +++ b/src/V3Ast.cpp @@ -846,15 +846,6 @@ void AstNode::addHereThisAsNext(AstNode* newp) { debugTreeChange(this, "-addHereThisAsNext: ", __LINE__, true); } -void AstNode::swapWith(AstNode* bp) { - VNRelinker aHandle; - VNRelinker bHandle; - this->unlinkFrBack(&aHandle); - bp->unlinkFrBack(&bHandle); - aHandle.relink(bp); - bHandle.relink(this); -} - //====================================================================== // Clone diff --git a/src/V3Ast.h b/src/V3Ast.h index 00a4d95b3..e47eba089 100644 --- a/src/V3Ast.h +++ b/src/V3Ast.h @@ -822,7 +822,6 @@ public: AstNode* unlinkFrBack(VNRelinker* linkerp = nullptr); // Unlink this from whoever points to it, keep entire next list with unlinked node AstNode* unlinkFrBackWithNext(VNRelinker* linkerp = nullptr); - void swapWith(AstNode* bp); void relink(VNRelinker* linkerp); // Generally use linker->relink() instead void cloneRelinkNode() { cloneRelink(); }