Skip to content

Commit abbb0d9

Browse files
committed
[ELF] Remove unneeded toStr(ctx, x) when using ELFSyncStream
This patch removes the last use of the global `elf::ctx` outside of elf::link.
1 parent 6f87d14 commit abbb0d9

File tree

1 file changed

+2
-4
lines changed

1 file changed

+2
-4
lines changed

lld/ELF/Symbols.cpp

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -295,7 +295,7 @@ void elf::printTraceSymbol(const Symbol &sym, StringRef name) {
295295
else
296296
s = ": definition of ";
297297

298-
Msg(ctx) << toStr(sym.file->ctx, sym.file) << s << name;
298+
Msg(sym.file->ctx) << sym.file << s << name;
299299
}
300300

301301
static void recordWhyExtract(Ctx &ctx, const InputFile *reference,
@@ -320,9 +320,7 @@ void elf::maybeWarnUnorderableSymbol(Ctx &ctx, const Symbol *sym) {
320320
const InputFile *file = sym->file;
321321
auto *d = dyn_cast<Defined>(sym);
322322

323-
auto report = [&](StringRef s) {
324-
Warn(ctx) << toStr(ctx, file) << s << sym->getName();
325-
};
323+
auto report = [&](StringRef s) { Warn(ctx) << file << s << sym->getName(); };
326324

327325
if (sym->isUndefined()) {
328326
if (cast<Undefined>(sym)->discardedSecIdx)

0 commit comments

Comments
 (0)