[lld] 4a6f59a - [ELF] Replace lld::warn with Warn(ctx)
Fangrui Song via llvm-commits
llvm-commits at lists.llvm.org
Sat Nov 16 13:38:49 PST 2024
Author: Fangrui Song
Date: 2024-11-16T13:38:43-08:00
New Revision: 4a6f59ac3c13e5c4df0b2deb3e6918d0ce219e57
URL: https://github.com/llvm/llvm-project/commit/4a6f59ac3c13e5c4df0b2deb3e6918d0ce219e57
DIFF: https://github.com/llvm/llvm-project/commit/4a6f59ac3c13e5c4df0b2deb3e6918d0ce219e57.diff
LOG: [ELF] Replace lld::warn with Warn(ctx)
Added:
Modified:
lld/ELF/Driver.cpp
lld/ELF/Symbols.cpp
Removed:
################################################################################
diff --git a/lld/ELF/Driver.cpp b/lld/ELF/Driver.cpp
index f2499d36dce062..8addff3d32edbb 100644
--- a/lld/ELF/Driver.cpp
+++ b/lld/ELF/Driver.cpp
@@ -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) &&
diff --git a/lld/ELF/Symbols.cpp b/lld/ELF/Symbols.cpp
index 06c5dcd488bee7..670a748363c5be 100644
--- a/lld/ELF/Symbols.cpp
+++ b/lld/ELF/Symbols.cpp
@@ -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()) {
More information about the llvm-commits
mailing list