[llvm] b7ce8fa - [LLJIT] Add std::move() as a workaround for older compilers

Jan Korous via llvm-commits llvm-commits at lists.llvm.org
Fri Mar 13 15:25:48 PDT 2020


Author: Jan Korous
Date: 2020-03-13T15:25:25-07:00
New Revision: b7ce8fa91ed2f01cb15d9f69d9819fc6893305f2

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

LOG: [LLJIT] Add std::move() as a workaround for older compilers

Clang 3.8 isn't able to bind the variable to rvalue-ref which breaks the build.

Added: 
    

Modified: 
    llvm/lib/ExecutionEngine/Orc/LLJIT.cpp

Removed: 
    


################################################################################
diff  --git a/llvm/lib/ExecutionEngine/Orc/LLJIT.cpp b/llvm/lib/ExecutionEngine/Orc/LLJIT.cpp
index cfb1bb8c7eab..63a5b1f09c82 100644
--- a/llvm/lib/ExecutionEngine/Orc/LLJIT.cpp
+++ b/llvm/lib/ExecutionEngine/Orc/LLJIT.cpp
@@ -928,7 +928,7 @@ Error LLJITBuilderState::prepareForConstruction() {
             ES, std::make_unique<jitlink::InProcessMemoryManager>());
         ObjLinkingLayer->addPlugin(std::make_unique<EHFrameRegistrationPlugin>(
             jitlink::InProcessEHFrameRegistrar::getInstance()));
-        return ObjLinkingLayer;
+        return std::move(ObjLinkingLayer);
       };
     }
   }


        


More information about the llvm-commits mailing list