[PATCH] D145445: Try to fix buildbot issues where some compilers can't auto move objects and most can.

Greg Clayton via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Mon Mar 6 15:48:48 PST 2023


clayborg created this revision.
Herald added a subscriber: hiraditya.
Herald added a project: All.
clayborg requested review of this revision.
Herald added a project: LLVM.
Herald added a subscriber: llvm-commits.

Repository:
  rG LLVM Github Monorepo

https://reviews.llvm.org/D145445

Files:
  llvm/lib/DebugInfo/GSYM/GsymCreator.cpp
  llvm/unittests/DebugInfo/GSYM/GSYMTest.cpp


Index: llvm/unittests/DebugInfo/GSYM/GSYMTest.cpp
===================================================================
--- llvm/unittests/DebugInfo/GSYM/GSYMTest.cpp
+++ llvm/unittests/DebugInfo/GSYM/GSYMTest.cpp
@@ -2486,17 +2486,17 @@
 
 // Finalize a GsymCreator, encode it and decode it and return the error or
 // GsymReader that was successfully decoded.
-static Expected<GsymReader> FinalizeEncodeAndDecode(GsymCreator &GC) {
-  Error FinalizeErr = GC.finalize(llvm::nulls());
+static llvm::Expected<GsymReader> FinalizeEncodeAndDecode(GsymCreator &GC) {
+  llvm::Error FinalizeErr = GC.finalize(llvm::nulls());
   if (FinalizeErr)
-    return FinalizeErr;
+    return std::move(FinalizeErr);
   SmallString<1024> Str;
   raw_svector_ostream OutStrm(Str);
   const auto ByteOrder = support::endian::system_endianness();
   FileWriter FW(OutStrm, ByteOrder);
   llvm::Error Err = GC.encode(FW);
   if (Err)
-    return Err;
+    return std::move(Err);
   return GsymReader::copyBuffer(OutStrm.str());
 }
 
Index: llvm/lib/DebugInfo/GSYM/GsymCreator.cpp
===================================================================
--- llvm/lib/DebugInfo/GSYM/GsymCreator.cpp
+++ llvm/lib/DebugInfo/GSYM/GsymCreator.cpp
@@ -573,5 +573,5 @@
     }
     SegmentFuncInfosSize += alignTo(GC->copyFunctionInfo(*this, FuncIdx), 4);
   }
-  return GC;
+  return std::move(GC);
 }


-------------- next part --------------
A non-text attachment was scrubbed...
Name: D145445.502840.patch
Type: text/x-patch
Size: 1367 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20230306/4317dc26/attachment.bin>


More information about the llvm-commits mailing list