summaryrefslogtreecommitdiff
path: root/lld/ELF/InputFiles.cpp
diff options
context:
space:
mode:
authorFangrui Song <i@maskray.me>2024-11-16 13:22:06 -0800
committerFangrui Song <i@maskray.me>2024-11-16 13:22:06 -0800
commit38870fe124eb5e6e24136f9d3e4551a62370faee (patch)
tree87e3c2ba9643993b6c5833dd3c2f0ffdbbb2a4bb /lld/ELF/InputFiles.cpp
parentbe5dad012eb75d61935f6c76034a8867f7443731 (diff)
[ELF] Remove unneeded toString(Error) when using ELFSyncStream
Diffstat (limited to 'lld/ELF/InputFiles.cpp')
-rw-r--r--lld/ELF/InputFiles.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/lld/ELF/InputFiles.cpp b/lld/ELF/InputFiles.cpp
index 15737650be4c..9fa4f35275b3 100644
--- a/lld/ELF/InputFiles.cpp
+++ b/lld/ELF/InputFiles.cpp
@@ -480,7 +480,7 @@ template <class ELFT> DWARFCache *ObjFile<ELFT>::getDwarf() {
llvm::call_once(initDwarf, [this]() {
dwarf = std::make_unique<DWARFCache>(std::make_unique<DWARFContext>(
std::make_unique<LLDDwarfObj<ELFT>>(this), "",
- [&](Error err) { warn(getName() + ": " + toString(std::move(err))); },
+ [&](Error err) { Warn(ctx) << getName() + ": " << std::move(err); },
[&](Error 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(ctx) << &isec << ": " << llvm::toString(std::move(e));
+ Warn(ctx) << &isec << ": " << std::move(e);
} else {
updateSupportedARMFeatures(ctx, attributes);
updateARMVFPArgs(ctx, attributes, this);