[lld] [lld] Turn misc copy-assign to move-assign (PR #184145)

via llvm-commits llvm-commits at lists.llvm.org
Mon Mar 2 06:53:04 PST 2026


https://github.com/serge-sans-paille created https://github.com/llvm/llvm-project/pull/184145

That's an automated patch generated from clang-tidy performance-use-std-move as a follow-up to #184136

>From dff8e16d12199aae44085a6de500d6bf83b27deb Mon Sep 17 00:00:00 2001
From: serge-sans-paille <sguelton at mozilla.com>
Date: Mon, 2 Mar 2026 15:50:02 +0100
Subject: [PATCH] [lld] Turn misc copy-assign to move-assign

That's an automated patch generated from clang-tidy
performance-use-std-move as a follow-up to #184136
---
 lld/COFF/Driver.cpp         | 2 +-
 lld/wasm/OutputSections.cpp | 2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/lld/COFF/Driver.cpp b/lld/COFF/Driver.cpp
index 699d53ca6d2e3..df76f05ed5a06 100644
--- a/lld/COFF/Driver.cpp
+++ b/lld/COFF/Driver.cpp
@@ -868,7 +868,7 @@ void LinkerDriver::addWinSysRootLibSearchPaths() {
   llvm::StringSet<> noDefaultLibs;
   for (auto &iter : ctx.config.noDefaultLibs)
     noDefaultLibs.insert(findLib(iter.first()).lower());
-  ctx.config.noDefaultLibs = noDefaultLibs;
+  ctx.config.noDefaultLibs = std::move(noDefaultLibs);
 }
 
 // Parses LIB environment which contains a list of search paths.
diff --git a/lld/wasm/OutputSections.cpp b/lld/wasm/OutputSections.cpp
index 454dc7293408d..22c001eaa43b7 100644
--- a/lld/wasm/OutputSections.cpp
+++ b/lld/wasm/OutputSections.cpp
@@ -240,7 +240,7 @@ void CustomSection::finalizeInputSections() {
     return;
 
   mergedSection->finalizeContents();
-  inputSections = newSections;
+  inputSections = std::move(newSections);
 }
 
 void CustomSection::finalizeContents() {



More information about the llvm-commits mailing list