[llvm] 8b9b45c - [JITLink] Fix some missing std::moves.

Lang Hames via llvm-commits llvm-commits at lists.llvm.org
Sun Aug 14 11:43:44 PDT 2022


Author: Lang Hames
Date: 2022-08-14T11:42:26-07:00
New Revision: 8b9b45ce5458f2a6e45a14418838afd7bab97bef

URL: https://github.com/llvm/llvm-project/commit/8b9b45ce5458f2a6e45a14418838afd7bab97bef
DIFF: https://github.com/llvm/llvm-project/commit/8b9b45ce5458f2a6e45a14418838afd7bab97bef.diff

LOG: [JITLink] Fix some missing std::moves.

This should fix failures on some bots due to 1cf81274f42
(e.g. https://lab.llvm.org/buildbot#builders/196/builds/16684)

Added: 
    

Modified: 
    llvm/lib/ExecutionEngine/JITLink/EHFrameSupport.cpp

Removed: 
    


################################################################################
diff  --git a/llvm/lib/ExecutionEngine/JITLink/EHFrameSupport.cpp b/llvm/lib/ExecutionEngine/JITLink/EHFrameSupport.cpp
index b0d79276367d..86249591a9be 100644
--- a/llvm/lib/ExecutionEngine/JITLink/EHFrameSupport.cpp
+++ b/llvm/lib/ExecutionEngine/JITLink/EHFrameSupport.cpp
@@ -89,7 +89,7 @@ static Expected<size_t> readCFIRecordLength(const Block &B,
                                             BinaryStreamReader &R) {
   uint32_t Length;
   if (auto Err = R.readInteger(Length))
-    return Err;
+    return std::move(Err);
 
   // If Length < 0xffffffff then use the regular length field, otherwise
   // read the extended length field.
@@ -98,7 +98,7 @@ static Expected<size_t> readCFIRecordLength(const Block &B,
 
   uint64_t ExtendedLength;
   if (auto Err = R.readInteger(ExtendedLength))
-    return Err;
+    return std::move(Err);
 
   if (ExtendedLength > std::numeric_limits<size_t>::max())
     return make_error<JITLinkError>(


        


More information about the llvm-commits mailing list