mirror of
https://github.com/verilator/verilator.git
synced 2026-10-06 01:54:01 +02:00
astgen: generate type specific addNext, remove astNextNull
Generate type specific static overloads of Ast<Node>::addNext, which return the correct sub-type of the 'this' they were invoked on. Also remove AstNode::addNextNull, which is now only used in the parser, implement in verilog.y directly as a template function.
This commit is contained in:
+1
-5
@@ -177,11 +177,7 @@ private:
|
||||
AstNode* addsp = nullptr;
|
||||
if (AstNode* const stmtsp = nodep->stmtsp()) {
|
||||
stmtsp->unlinkFrBackWithNext();
|
||||
if (addsp) {
|
||||
addsp = addsp->addNextNull(stmtsp);
|
||||
} else {
|
||||
addsp = stmtsp;
|
||||
}
|
||||
addsp = AstNode::addNext(addsp, stmtsp);
|
||||
}
|
||||
if (addsp) {
|
||||
nodep->replaceWith(addsp);
|
||||
|
||||
Reference in New Issue
Block a user