diff --git a/lld/COFF/Driver.cpp b/lld/COFF/Driver.cpp index 699d53ca6d2e..df76f05ed5a0 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 454dc7293408..22c001eaa43b 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() {