Internals: Eliminate extra constructor call in FileLine warn off, and commentary.

This commit is contained in:
Wilson Snyder
2010-01-19 21:30:12 -05:00
parent bb20331f9e
commit 28eb5b9bc4
6 changed files with 21 additions and 12 deletions
+2 -2
View File
@@ -399,7 +399,7 @@ private:
} else if (nodep->varp()->isSigPublic()) {
nodep->v3warn(UNOPT,"Signal unoptimizable: Feedback to public clock or circular logic: "<<nodep->prettyName());
if (!nodep->fileline()->warnIsOff(V3ErrorCode::UNOPT)) {
nodep->fileline()->warnOff(V3ErrorCode::UNOPT, true); // Complain just once
nodep->fileline()->modifyWarnOff(V3ErrorCode::UNOPT, true); // Complain just once
// Give the user an example.
bool tempWeight = (edgep && edgep->weight()==0);
if (tempWeight) edgep->weight(1); // Else the below loop detect can't see the loop
@@ -411,7 +411,7 @@ private:
// First v3warn not inside warnIsOff so we can see the suppressions with --debug
nodep->v3warn(UNOPTFLAT,"Signal unoptimizable: Feedback to clock or circular logic: "<<nodep->prettyName());
if (!nodep->fileline()->warnIsOff(V3ErrorCode::UNOPTFLAT)) {
nodep->fileline()->warnOff(V3ErrorCode::UNOPTFLAT, true); // Complain just once
nodep->fileline()->modifyWarnOff(V3ErrorCode::UNOPTFLAT, true); // Complain just once
// Give the user an example.
bool tempWeight = (edgep && edgep->weight()==0);
if (tempWeight) edgep->weight(1); // Else the below loop detect can't see the loop