[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:40 PST 2026
llvmbot wrote:
<!--LLVM PR SUMMARY COMMENT-->
@llvm/pr-subscribers-lld-coff
Author: None (serge-sans-paille)
<details>
<summary>Changes</summary>
That's an automated patch generated from clang-tidy performance-use-std-move as a follow-up to #<!-- -->184136
---
Full diff: https://github.com/llvm/llvm-project/pull/184145.diff
2 Files Affected:
- (modified) lld/COFF/Driver.cpp (+1-1)
- (modified) lld/wasm/OutputSections.cpp (+1-1)
``````````diff
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() {
``````````
</details>
https://github.com/llvm/llvm-project/pull/184145
More information about the llvm-commits
mailing list