[ORC] Fix a missing move in ce2207abaf9.
authorLang Hames <lhames@gmail.com>
Wed, 22 Jan 2020 04:12:10 +0000 (20:12 -0800)
committerLang Hames <lhames@gmail.com>
Wed, 22 Jan 2020 04:14:50 +0000 (20:14 -0800)
This should fix the build failure at
http://lab.llvm.org:8011/builders/clang-cmake-x86_64-sde-avx512-linux/builds/32524
and others.

llvm/lib/ExecutionEngine/Orc/CompileUtils.cpp

index 8d2c2d9..160e5ba 100644 (file)
@@ -37,7 +37,7 @@ irManglingOptionsFromTargetOptions(const TargetOptions &Opts) {
 Expected<SimpleCompiler::CompileResult> SimpleCompiler::operator()(Module &M) {
   CompileResult CachedObject = tryToLoadFromObjectCache(M);
   if (CachedObject)
-    return CachedObject;
+    return std::move(CachedObject);
 
   SmallVector<char, 0> ObjBufferSV;