[llvm] r268111 - [Orc] Make sure we don't drop the internal error in OrcRemoteTargetClient when

Lang Hames via llvm-commits llvm-commits at lists.llvm.org
Fri Apr 29 14:29:49 PDT 2016


Author: lhames
Date: Fri Apr 29 16:29:48 2016
New Revision: 268111

URL: http://llvm.org/viewvc/llvm-project?rev=268111&view=rev
Log:
[Orc] Make sure we don't drop the internal error in OrcRemoteTargetClient when
the constructor fails, as this would lead to an 'unchecked error' crash.

Modified:
    llvm/trunk/include/llvm/ExecutionEngine/Orc/OrcRemoteTargetClient.h

Modified: llvm/trunk/include/llvm/ExecutionEngine/Orc/OrcRemoteTargetClient.h
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/include/llvm/ExecutionEngine/Orc/OrcRemoteTargetClient.h?rev=268111&r1=268110&r2=268111&view=diff
==============================================================================
--- llvm/trunk/include/llvm/ExecutionEngine/Orc/OrcRemoteTargetClient.h (original)
+++ llvm/trunk/include/llvm/ExecutionEngine/Orc/OrcRemoteTargetClient.h Fri Apr 29 16:29:48 2016
@@ -693,8 +693,9 @@ private:
       std::tie(RemoteTargetTriple, RemotePointerSize, RemotePageSize,
                RemoteTrampolineSize, RemoteIndirectStubSize) = *RIOrErr;
       Err = Error::success();
-    } else
-      Err = RIOrErr.takeError();
+    } else {
+      Err = joinErrors(RIOrErr.takeError(), std::move(ExistingError));
+    }
   }
 
   Error deregisterEHFrames(TargetAddress Addr, uint32_t Size) {




More information about the llvm-commits mailing list