diff --git a/lib/Frontend/CachingUtils.cpp b/lib/Frontend/CachingUtils.cpp index e51a695bafdd2..43c64760c8cf9 100644 --- a/lib/Frontend/CachingUtils.cpp +++ b/lib/Frontend/CachingUtils.cpp @@ -90,7 +90,7 @@ Expected cas::CachedResultLoader::replay(CallbackTy Callback) { [&](swift::cas::CompileJobCacheResult::Output Output) -> Error { return Callback(Output.Kind, Output.Object); })) - return Err; + return std::move(Err); return true; } @@ -120,7 +120,7 @@ Expected cas::CachedResultLoader::replay(CallbackTy Callback) { "Unexpected output kind in clang cached result"); return Callback(OutputKind, Output.Object); })) - return Err; + return std::move(Err); return true; }