Skip to content

Commit 9ccd7ee

Browse files
committed
Fix -Wpessimizing-move warnings in rustllvm/PassWrapper
1 parent a5c2d0f commit 9ccd7ee

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

src/rustllvm/PassWrapper.cpp

+3-3
Original file line numberDiff line numberDiff line change
@@ -1092,7 +1092,7 @@ LLVMRustPrepareThinLTOImport(const LLVMRustThinLTOData *Data, LLVMModuleRef M) {
10921092
auto MOrErr = getLazyBitcodeModule(Memory, Context, true, true);
10931093

10941094
if (!MOrErr)
1095-
return std::move(MOrErr);
1095+
return MOrErr;
10961096

10971097
// The rest of this closure is a workaround for
10981098
// https://bugs.llvm.org/show_bug.cgi?id=38184 where during ThinLTO imports
@@ -1110,14 +1110,14 @@ LLVMRustPrepareThinLTOImport(const LLVMRustThinLTOData *Data, LLVMModuleRef M) {
11101110
// shouldn't be a perf hit.
11111111
if (Error Err = (*MOrErr)->materializeMetadata()) {
11121112
Expected<std::unique_ptr<Module>> Ret(std::move(Err));
1113-
return std::move(Ret);
1113+
return Ret;
11141114
}
11151115

11161116
auto *WasmCustomSections = (*MOrErr)->getNamedMetadata("wasm.custom_sections");
11171117
if (WasmCustomSections)
11181118
WasmCustomSections->eraseFromParent();
11191119

1120-
return std::move(MOrErr);
1120+
return MOrErr;
11211121
};
11221122
FunctionImporter Importer(Data->Index, Loader);
11231123
Expected<bool> Result = Importer.importFunctions(Mod, ImportList);

0 commit comments

Comments
 (0)