diff options
| author | Fangrui Song <i@maskray.me> | 2024-11-06 22:19:31 -0800 |
|---|---|---|
| committer | Fangrui Song <i@maskray.me> | 2024-11-06 22:19:31 -0800 |
| commit | f8bae3af74e7c60d996f0d331cad04f2eace7f8f (patch) | |
| tree | f718d25356140dc2588a0dcd5399475d7707e532 /lld/ELF/InputFiles.cpp | |
| parent | 09c2c5e1e9f3b3bb17f777f153407430f3cef15e (diff) | |
[ELF] Replace warn(...) with Warn
Diffstat (limited to 'lld/ELF/InputFiles.cpp')
| -rw-r--r-- | lld/ELF/InputFiles.cpp | 16 |
1 files changed, 8 insertions, 8 deletions
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 <class ELFT> DWARFCache *ObjFile<ELFT>::getDwarf() { std::make_unique<LLDDwarfObj<ELFT>>(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 <class ELFT> void ObjFile<ELFT>::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<ELFT>::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; |
