Internals: Fix V3LinkDot debug message print

This commit is contained in:
Wilson Snyder 2024-09-15 21:18:51 -04:00
parent c8de3630a5
commit 195a665293
1 changed files with 5 additions and 3 deletions

View File

@ -2107,13 +2107,14 @@ class LinkDotResolveVisitor final : public VNVisitor {
// TYPES // TYPES
enum DotPosition : uint8_t { enum DotPosition : uint8_t {
// Must match ascii() method below
DP_NONE = 0, // Not under a DOT DP_NONE = 0, // Not under a DOT
DP_PACKAGE, // {package}:: DOT DP_PACKAGE, // {package}:: DOT
DP_FIRST, // {scope-or-var} DOT DP_FIRST, // {scope-or-var} DOT
DP_SCOPE, // DOT... {scope-or-var} DOT DP_SCOPE, // DOT... {scope-or-var} DOT
DP_FINAL, // [DOT...] {var-or-func-or-dtype} with no following dots DP_FINAL, // [DOT...] {var-or-func-or-dtype} with no following dots
DP_MEMBER DP_MEMBER // DOT {member-name} [DOT...]
}; // DOT {member-name} [DOT...] };
// STATE // STATE
LinkDotState* const m_statep; // State, including dotted symbol table LinkDotState* const m_statep; // State, including dotted symbol table
@ -2160,7 +2161,8 @@ class LinkDotResolveVisitor final : public VNVisitor {
m_unlinkedScopep = nullptr; m_unlinkedScopep = nullptr;
} }
string ascii() const { string ascii() const {
static const char* const names[] = {"NONE", "PACKAGE", "SCOPE", "FINAL", "MEMBER"}; static const char* const names[]
= {"NONE", "PACKAGE", "FIRST", "SCOPE", "FINAL", "MEMBER"};
std::ostringstream sstr; std::ostringstream sstr;
sstr << "ds=" << names[m_dotPos]; sstr << "ds=" << names[m_dotPos];
sstr << " dse" << cvtToHex(m_dotSymp); sstr << " dse" << cvtToHex(m_dotSymp);