[ELF] Replace lld::warn with Warn(ctx)

This commit is contained in:
Fangrui Song 2024-11-16 13:38:43 -08:00
parent 6c19fa4bfc
commit 4a6f59ac3c
2 changed files with 2 additions and 2 deletions

View File

@ -641,7 +641,7 @@ void LinkerDriver::linkerMain(ArrayRef<const char *> argsArr) {
ELFOptTable parser;
opt::InputArgList args = parser.parse(ctx, argsArr.slice(1));
// Interpret these flags early because error()/warn() depend on them.
// Interpret these flags early because Err/Warn depend on them.
errorHandler().errorLimit = args::getInteger(args, OPT_error_limit, 20);
errorHandler().fatalWarnings =
args.hasFlag(OPT_fatal_warnings, OPT_no_fatal_warnings, false) &&

View File

@ -321,7 +321,7 @@ void elf::maybeWarnUnorderableSymbol(Ctx &ctx, const Symbol *sym) {
auto *d = dyn_cast<Defined>(sym);
auto report = [&](StringRef s) {
warn(toStr(ctx, file) + s + sym->getName());
Warn(ctx) << toStr(ctx, file) << s << sym->getName();
};
if (sym->isUndefined()) {