mirror of
https://github.com/verilator/verilator.git
synced 2025-01-25 07:44:14 +00:00
Internals: Remove unneeded constructor.
This commit is contained in:
parent
d07a6f81e4
commit
0765443353
@ -134,8 +134,7 @@ private:
|
||||
AstNode* exprp = nodep->exprp()->unlinkFrBack();
|
||||
AstNode* past = new AstPast(fl, exprp, nullptr);
|
||||
past->dtypeFrom(exprp);
|
||||
exprp = new AstEq(fl, past,
|
||||
exprp->cloneTree(false));
|
||||
exprp = new AstEq(fl, past, exprp->cloneTree(false));
|
||||
exprp->dtypeSetLogicBool();
|
||||
nodep->replaceWith(exprp);
|
||||
nodep->sentreep(newSenTree(nodep));
|
||||
|
@ -58,9 +58,10 @@ std::ostream& operator<<(std::ostream& os, AstType rhs);
|
||||
//######################################################################
|
||||
// Creators
|
||||
|
||||
void AstNode::init() {
|
||||
AstNode::AstNode(AstType t, FileLine* fl)
|
||||
: m_type{t}
|
||||
, m_fileline{fl} {
|
||||
editCountInc();
|
||||
m_fileline = nullptr;
|
||||
m_nextp = nullptr;
|
||||
m_backp = nullptr;
|
||||
m_headtailp = this; // When made, we're a list of only a single element
|
||||
|
11
src/V3Ast.h
11
src/V3Ast.h
@ -1449,7 +1449,6 @@ class AstNode {
|
||||
if (nodep) nodep->m_backp = this;
|
||||
}
|
||||
|
||||
void init(); // initialize value of AstNode
|
||||
private:
|
||||
AstNode* cloneTreeIter();
|
||||
AstNode* cloneTreeIterList();
|
||||
@ -1469,15 +1468,7 @@ public:
|
||||
|
||||
protected:
|
||||
// CONSTRUCTORS
|
||||
AstNode(AstType t)
|
||||
: m_type{t} {
|
||||
init();
|
||||
}
|
||||
AstNode(AstType t, FileLine* fl)
|
||||
: m_type{t} {
|
||||
init();
|
||||
m_fileline = fl;
|
||||
}
|
||||
AstNode(AstType t, FileLine* fl);
|
||||
virtual AstNode* clone() = 0; // Generally, cloneTree is what you want instead
|
||||
virtual void cloneRelink() {}
|
||||
void cloneRelinkTree();
|
||||
|
Loading…
Reference in New Issue
Block a user