mirror of
https://github.com/verilator/verilator.git
synced 2026-10-06 10:03:44 +02:00
Move swap to V3Ast, and tell which AstUser*InUse fails assertions
This commit is contained in:
@@ -559,6 +559,15 @@ void AstNode::relinkOneLink(AstNode*& pointpr, // Ref to pointer that gets set
|
||||
pointpr = newp;
|
||||
}
|
||||
|
||||
void AstNode::swapWith (AstNode* bp) {
|
||||
AstNRelinker aHandle;
|
||||
AstNRelinker bHandle;
|
||||
this->unlinkFrBack(&aHandle);
|
||||
bp->unlinkFrBack(&bHandle);
|
||||
aHandle.relink(bp);
|
||||
bHandle.relink(this);
|
||||
}
|
||||
|
||||
//======================================================================
|
||||
// Clone
|
||||
|
||||
|
||||
Reference in New Issue
Block a user