diff --git a/llvm/lib/Support/StatCacheFileSystem.cpp b/llvm/lib/Support/StatCacheFileSystem.cpp index 96fd32bf5082cb..4633a0d885d984 100644 --- a/llvm/lib/Support/StatCacheFileSystem.cpp +++ b/llvm/lib/Support/StatCacheFileSystem.cpp @@ -156,7 +156,7 @@ StatCacheFileSystem::create(std::unique_ptr CacheBuffer, uint64_t ValidityToken; if (auto E = validateCacheFile(*CacheBuffer, BaseDir, IsCaseSensitive, VersionMatch, ValidityToken)) - return E; + return std::move(E); if (!VersionMatch) { return createStringError(inconvertibleErrorCode(), CacheBuffer->getBufferIdentifier() +