Fix internals to make null-pointer-check clean. Also add more const's. No functional change intended, but likely something will break.

This commit is contained in:
Wilson Snyder
2018-02-01 21:32:58 -05:00
parent 94e8cf1de9
commit 597d28b505
73 changed files with 1421 additions and 1373 deletions
+1 -1
View File
@@ -82,7 +82,7 @@ private:
AstNode* duporigp = hashed.iteratorNodep(dupit);
// Note hashed will point to the original variable (what's duplicated), not the covertoggle,
// but we need to get back to the covertoggle which is immediately above, so:
AstCoverToggle* removep = duporigp->backp()->castCoverToggle();
AstCoverToggle* removep = VN_CAST(duporigp->backp(), CoverToggle);
if (!removep) nodep->v3fatalSrc("CoverageJoin duplicate of wrong type");
UINFO(8," Orig "<<nodep<<" -->> "<<nodep->incp()->declp()<<endl);
UINFO(8," dup "<<removep<<" -->> "<<removep->incp()->declp()<<endl);