Internals: Move prettyName invocation to after option checks in trace and coverage

Signed-off-by: Wilson Snyder <wsnyder@wsnyder.org>
This commit is contained in:
Johan Bjork 2016-09-12 21:52:40 -04:00 committed by Wilson Snyder
parent f11757e43a
commit 901da118e5
2 changed files with 2 additions and 2 deletions

View File

@ -83,10 +83,10 @@ private:
const char* varIgnoreToggle(AstVar* nodep) {
// Return true if this shouldn't be traced
// See also similar rule in V3TraceDecl::varIgnoreTrace
string prettyName = nodep->prettyName();
if (!nodep->isToggleCoverable())
return "Not relevant signal type";
if (!v3Global.opt.coverageUnderscore()) {
string prettyName = nodep->prettyName();
if (prettyName[0] == '_')
return "Leading underscore";
if (prettyName.find("._") != string::npos)

View File

@ -68,7 +68,6 @@ private:
// Return true if this shouldn't be traced
// See also similar rule in V3Coverage::varIgnoreToggle
AstVar* varp = nodep->varp();
string prettyName = varp->prettyName();
if (!varp->isTrace()) {
return "Verilator trace_off";
}
@ -76,6 +75,7 @@ private:
return "Verilator cell trace_off";
}
else if (!v3Global.opt.traceUnderscore()) {
string prettyName = varp->prettyName();
if (prettyName.size()>=1 && prettyName[0] == '_')
return "Leading underscore";
if (prettyName.find("._") != string::npos)