From c47132360192767c51847fd2ad540b30955b2304 Mon Sep 17 00:00:00 2001 From: Geza Lore Date: Tue, 21 Oct 2025 10:56:39 +0100 Subject: [PATCH] Internals: Remove unused AstNode::swapWith --- src/V3Ast.cpp | 9 --------- src/V3Ast.h | 1 - 2 files changed, 10 deletions(-) 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(); }