[StatCacheFileSystem] Attempt to fix build
authorFred Riss <friss@apple.com>
Wed, 18 Jan 2023 22:46:55 +0000 (14:46 -0800)
committerFred Riss <friss@apple.com>
Wed, 18 Jan 2023 22:46:55 +0000 (14:46 -0800)
Some bots are not happy with the way Error is returned here. Let's see if
std::moving it fixes this.

llvm/lib/Support/StatCacheFileSystem.cpp

index 96fd32b..4633a0d 100644 (file)
@@ -156,7 +156,7 @@ StatCacheFileSystem::create(std::unique_ptr<MemoryBuffer> 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() +