Skip to content

Commit

Permalink
Respect --dump-tree-addrids in tree dumps
Browse files Browse the repository at this point in the history
  • Loading branch information
gezalore committed Oct 25, 2023
1 parent f91259f commit 34708bb
Showing 1 changed file with 7 additions and 7 deletions.
14 changes: 7 additions & 7 deletions src/V3AstNodes.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1455,7 +1455,7 @@ const char* AstCell::broken() const {
void AstCellInline::dump(std::ostream& str) const {
this->AstNode::dump(str);
str << " -> " << origModName();
str << " [scopep=" << reinterpret_cast<const void*>(scopep()) << "]";
str << " [scopep=" << nodeAddr(scopep()) << "]";
}
const char* AstCellInline::broken() const {
BROKEN_RTN(m_scopep && !m_scopep->brokeExists());
Expand Down Expand Up @@ -1624,7 +1624,7 @@ void AstInitArray::dump(std::ostream& str) const {
str << " ...";
break;
}
str << " [" << itr.first << "]=" << reinterpret_cast<const void*>(itr.second);
str << " [" << itr.first << "]=" << nodeAddr(itr.second);
}
}
const char* AstInitArray::broken() const {
Expand Down Expand Up @@ -2038,7 +2038,7 @@ void AstTypeTable::dump(std::ostream& str) const {
}
void AstAssocArrayDType::dumpSmall(std::ostream& str) const {
this->AstNodeDType::dumpSmall(str);
str << "[assoc-" << reinterpret_cast<const void*>(keyDTypep()) << "]";
str << "[assoc-" << nodeAddr(keyDTypep()) << "]";
}
string AstAssocArrayDType::prettyDTypeName() const {
return subDTypep()->prettyDTypeName() + "[" + keyDTypep()->prettyDTypeName() + "]";
Expand Down Expand Up @@ -2106,7 +2106,7 @@ void AstStreamDType::dumpSmall(std::ostream& str) const {
void AstVarScope::dump(std::ostream& str) const {
this->AstNode::dump(str);
if (isTrace()) str << " [T]";
if (scopep()) str << " [scopep=" << reinterpret_cast<const void*>(scopep()) << "]";
if (scopep()) str << " [scopep=" << nodeAddr(scopep()) << "]";
if (varp()) {
str << " -> ";
varp()->dump(str);
Expand Down Expand Up @@ -2195,9 +2195,9 @@ bool AstVar::same(const AstNode* samep) const {
}
void AstScope::dump(std::ostream& str) const {
this->AstNode::dump(str);
str << " [abovep=" << reinterpret_cast<const void*>(aboveScopep()) << "]";
str << " [cellp=" << reinterpret_cast<const void*>(aboveCellp()) << "]";
str << " [modp=" << reinterpret_cast<const void*>(modp()) << "]";
str << " [abovep=" << nodeAddr(aboveScopep()) << "]";
str << " [cellp=" << nodeAddr(aboveCellp()) << "]";
str << " [modp=" << nodeAddr(modp()) << "]";
}
bool AstScope::same(const AstNode* samep) const {
const AstScope* const asamep = VN_DBG_AS(samep, Scope);
Expand Down

0 comments on commit 34708bb

Please sign in to comment.