Error messages note when a symbol has been purged (#1453)

This commit is contained in:
Sylvie
2024-08-06 15:35:06 -04:00
committed by GitHub
parent fc8707886c
commit 7435630d6a
8 changed files with 55 additions and 11 deletions

View File

@@ -1527,8 +1527,12 @@ string:
| POP_SECTION LPAREN scoped_anon_id RPAREN {
Symbol *sym = sym_FindScopedValidSymbol($3);
if (!sym)
fatalerror("Unknown symbol \"%s\"\n", $3.c_str());
if (!sym) {
if (sym_IsPurgedScoped($3))
fatalerror("Unknown symbol \"%s\"; it was purged\n", $3.c_str());
else
fatalerror("Unknown symbol \"%s\"\n", $3.c_str());
}
Section const *section = sym->getSection();
if (!section)