From f8bae3af74e7c60d996f0d331cad04f2eace7f8f Mon Sep 17 00:00:00 2001 From: Fangrui Song Date: Wed, 6 Nov 2024 22:19:31 -0800 Subject: [ELF] Replace warn(...) with Warn --- lld/ELF/InputFiles.cpp | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) (limited to 'lld/ELF/InputFiles.cpp') diff --git a/lld/ELF/InputFiles.cpp b/lld/ELF/InputFiles.cpp index 4c440cebc37f..6e6d7bfa5160 100644 --- a/lld/ELF/InputFiles.cpp +++ b/lld/ELF/InputFiles.cpp @@ -482,7 +482,7 @@ template DWARFCache *ObjFile::getDwarf() { std::make_unique>(this), "", [&](Error err) { warn(getName() + ": " + toString(std::move(err))); }, [&](Error warning) { - warn(getName() + ": " + toString(std::move(warning))); + Warn(ctx) << getName() << ": " << std::move(warning); })); }); @@ -634,7 +634,7 @@ template void ObjFile::parse(bool ignoreComdats) { ? llvm::endianness::little : llvm::endianness::big)) { InputSection isec(*this, sec, name); - warn(toString(&isec) + ": " + llvm::toString(std::move(e))); + Warn(ctx) << &isec << ": " << llvm::toString(std::move(e)); } else { updateSupportedARMFeatures(ctx, attributes); updateARMVFPArgs(ctx, attributes, this); @@ -802,12 +802,12 @@ void ObjFile::initializeSections(bool ignoreComdats, if (sec.sh_link != 0) this->addrsigSec = &sec; else if (ctx.arg.icf == ICFLevel::Safe) - warn(toString(this) + - ": --icf=safe conservatively ignores " - "SHT_LLVM_ADDRSIG [index " + - Twine(i) + - "] with sh_link=0 " - "(likely created using objcopy or ld -r)"); + Warn(ctx) << this + << ": --icf=safe conservatively ignores " + "SHT_LLVM_ADDRSIG [index " + << Twine(i) + << "] with sh_link=0 " + "(likely created using objcopy or ld -r)"; } this->sections[i] = &InputSection::discarded; continue; -- cgit v1.2.3