[ELF] Move elf::symtab into Ctx
Remove the global variable `symtab` and add a member variable (`std::unique_ptr<SymbolTable>`) to `Ctx` instead. This is one step toward eliminating global states. Pull Request: https://github.com/llvm/llvm-project/pull/109612
This commit is contained in:
@@ -1581,7 +1581,7 @@ Expr ScriptParser::readPrimary() {
|
||||
// script, it must happen before this DEFINED.
|
||||
auto order = ctx.scriptSymOrderCounter++;
|
||||
return [=, &ctx = this->ctx] {
|
||||
Symbol *s = symtab.find(name);
|
||||
Symbol *s = ctx.symtab->find(name);
|
||||
return s && s->isDefined() && ctx.scriptSymOrder.lookup(s) < order ? 1
|
||||
: 0;
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user