Add debug comment when trace disabled (#4004).

This commit is contained in:
Wilson Snyder 2023-03-06 18:22:36 -05:00
parent f68c16a5e6
commit ff889fde18

View File

@ -237,8 +237,9 @@ private:
void addIgnore(const char* why) {
++m_statIgnSigs;
addToSubFunc(new AstComment{m_traVscp->fileline(),
"Tracing: " + m_traName + " // Ignored: " + why, true});
std::string cmt = std::string{"Tracing: "} + m_traName + " // Ignored: " + why;
if (debug() > 3 && m_traVscp) std::cout << "- " << m_traVscp->fileline() << cmt << endl;
addToSubFunc(new AstComment{m_traVscp->fileline(), cmt, true});
}
// VISITORS