Internals: Have cloning return node's type to avoid casts. No functional change.

This commit is contained in:
Wilson Snyder
2016-11-08 21:16:22 -05:00
parent b582e481c6
commit 183cabc77d
6 changed files with 33 additions and 31 deletions
+1 -1
View File
@@ -858,7 +858,7 @@ void AstNode::cloneRelinkTree() {
// private: Cleanup clone() operation on whole tree. Publicly call cloneTree() instead.
for (AstNode* nodep=this; nodep; nodep=nodep->m_nextp) {
if (m_dtypep && m_dtypep->clonep()) {
m_dtypep = m_dtypep->clonep()->castNodeDType();
m_dtypep = m_dtypep->clonep();
}
nodep->cloneRelink();
if (nodep->m_op1p) nodep->m_op1p->cloneRelinkTree();