Internals: Convert AstNUser to non-pointer to avoid NULL call. No functional change intended.

This commit is contained in:
Wilson Snyder
2016-11-27 09:40:12 -05:00
parent 7efa40966a
commit 2d0084308d
24 changed files with 187 additions and 164 deletions
+2 -2
View File
@@ -141,7 +141,7 @@ private:
// We don't need to test for tracing; it would be in the tracefunc if it was needed
UINFO(4," ModVar->BlkVar "<<nodep<<endl);
++m_statLocVars;
AstCFunc* newfuncp = nodep->user1p()->castNode()->castCFunc();
AstCFunc* newfuncp = nodep->user1p()->castCFunc();
nodep->unlinkFrBack();
newfuncp->addInitsp(nodep);
// Done
@@ -208,7 +208,7 @@ private:
// If we're scoping down to it, it isn't really in the same block
if (!nodep->hierThis()) clearOptimizable(nodep->varp(),"HierRef");
// Allow a variable to appear in only a single function
AstNode* oldfunc = nodep->varp()->user1p()->castNode();
AstNode* oldfunc = nodep->varp()->user1p();
if (!oldfunc) {
UINFO(4," BVnewref "<<nodep<<endl);
nodep->varp()->user1p(m_cfuncp); // Remember where it was used