<div dir="ltr">Thanks for that!<div><br></div><div>- Lang.</div></div><div class="gmail_extra"><br><div class="gmail_quote">On Mon, Jan 11, 2016 at 11:26 AM, David Blaikie via llvm-commits <span dir="ltr"><<a href="mailto:llvm-commits@lists.llvm.org" target="_blank">llvm-commits@lists.llvm.org</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">Author: dblaikie<br>
Date: Mon Jan 11 13:26:01 2016<br>
New Revision: 257367<br>
<br>
URL: <a href="http://llvm.org/viewvc/llvm-project?rev=257367&view=rev" rel="noreferrer" target="_blank">http://llvm.org/viewvc/llvm-project?rev=257367&view=rev</a><br>
Log:<br>
Fix some GCC 4.7 issues with the new Orc remote JIT support<br>
<br>
I'm still seeing GCC ICE locally, but figured I'd throw this at the wall<br>
& see if it sticks for the bots at least. Will continue investigating<br>
the ICE in any case.<br>
<br>
Modified:<br>
    llvm/trunk/include/llvm/ExecutionEngine/Orc/OrcRemoteTargetClient.h<br>
    llvm/trunk/include/llvm/ExecutionEngine/Orc/OrcRemoteTargetServer.h<br>
<br>
Modified: llvm/trunk/include/llvm/ExecutionEngine/Orc/OrcRemoteTargetClient.h<br>
URL: <a href="http://llvm.org/viewvc/llvm-project/llvm/trunk/include/llvm/ExecutionEngine/Orc/OrcRemoteTargetClient.h?rev=257367&r1=257366&r2=257367&view=diff" rel="noreferrer" target="_blank">http://llvm.org/viewvc/llvm-project/llvm/trunk/include/llvm/ExecutionEngine/Orc/OrcRemoteTargetClient.h?rev=257367&r1=257366&r2=257367&view=diff</a><br>
==============================================================================<br>
--- llvm/trunk/include/llvm/ExecutionEngine/Orc/OrcRemoteTargetClient.h (original)<br>
+++ llvm/trunk/include/llvm/ExecutionEngine/Orc/OrcRemoteTargetClient.h Mon Jan 11 13:26:01 2016<br>
@@ -701,10 +701,11 @@ private:<br>
     if (auto EC = call<ReserveMem>(Channel, Id, Size, Align))<br>
       return EC;<br>
<br>
-    if (auto EC = expect<ReserveMemResponse>(Channel, [&](TargetAddress Addr) {<br>
-          RemoteAddr = Addr;<br>
-          return std::error_code();<br>
-        }))<br>
+    if (std::error_code EC =<br>
+            expect<ReserveMemResponse>(Channel, [&](TargetAddress Addr) {<br>
+              RemoteAddr = Addr;<br>
+              return std::error_code();<br>
+            }))<br>
       return EC;<br>
<br>
     return std::error_code();<br>
<br>
Modified: llvm/trunk/include/llvm/ExecutionEngine/Orc/OrcRemoteTargetServer.h<br>
URL: <a href="http://llvm.org/viewvc/llvm-project/llvm/trunk/include/llvm/ExecutionEngine/Orc/OrcRemoteTargetServer.h?rev=257367&r1=257366&r2=257367&view=diff" rel="noreferrer" target="_blank">http://llvm.org/viewvc/llvm-project/llvm/trunk/include/llvm/ExecutionEngine/Orc/OrcRemoteTargetServer.h?rev=257367&r1=257366&r2=257367&view=diff</a><br>
==============================================================================<br>
--- llvm/trunk/include/llvm/ExecutionEngine/Orc/OrcRemoteTargetServer.h (original)<br>
+++ llvm/trunk/include/llvm/ExecutionEngine/Orc/OrcRemoteTargetServer.h Mon Jan 11 13:26:01 2016<br>
@@ -163,13 +163,16 @@ private:<br>
     typedef int (*IntVoidFnTy)();<br>
<br>
     IntVoidFnTy Fn = nullptr;<br>
-    if (auto EC = handle<CallIntVoid>(Channel, [&](TargetAddress Addr) {<br>
-          Fn = reinterpret_cast<IntVoidFnTy>(static_cast<uintptr_t>(Addr));<br>
-          return std::error_code();<br>
-        }))<br>
+    if (std::error_code EC =<br>
+            handle<CallIntVoid>(Channel, [&](TargetAddress Addr) {<br>
+              Fn = reinterpret_cast<IntVoidFnTy>(static_cast<uintptr_t>(Addr));<br>
+              return std::error_code();<br>
+            }))<br>
       return EC;<br>
<br>
-    DEBUG(dbgs() << "  Calling " << reinterpret_cast<void *>(Fn) << "\n");<br>
+    DEBUG(dbgs() << "  Calling "<br>
+                 << reinterpret_cast<void *>(reinterpret_cast<intptr_t>(Fn))<br>
+                 << "\n");<br>
     int Result = Fn();<br>
     DEBUG(dbgs() << "  Result = " << Result << "\n");<br>
<br>
@@ -181,7 +184,7 @@ private:<br>
<br>
     MainFnTy Fn = nullptr;<br>
     std::vector<std::string> Args;<br>
-    if (auto EC = handle<CallMain>(<br>
+    if (std::error_code EC = handle<CallMain>(<br>
             Channel, [&](TargetAddress Addr, std::vector<std::string> &A) {<br>
               Fn = reinterpret_cast<MainFnTy>(static_cast<uintptr_t>(Addr));<br>
               Args = std::move(A);<br>
@@ -207,10 +210,11 @@ private:<br>
     typedef void (*VoidVoidFnTy)();<br>
<br>
     VoidVoidFnTy Fn = nullptr;<br>
-    if (auto EC = handle<CallIntVoid>(Channel, [&](TargetAddress Addr) {<br>
-          Fn = reinterpret_cast<VoidVoidFnTy>(static_cast<uintptr_t>(Addr));<br>
-          return std::error_code();<br>
-        }))<br>
+    if (std::error_code EC =<br>
+            handle<CallIntVoid>(Channel, [&](TargetAddress Addr) {<br>
+              Fn = reinterpret_cast<VoidVoidFnTy>(static_cast<uintptr_t>(Addr));<br>
+              return std::error_code();<br>
+            }))<br>
       return EC;<br>
<br>
     DEBUG(dbgs() << "  Calling " << reinterpret_cast<void *>(Fn) << "\n");<br>
@@ -387,7 +391,7 @@ private:<br>
   std::error_code handleReadMem() {<br>
     char *Src = nullptr;<br>
     uint64_t Size = 0;<br>
-    if (auto EC =<br>
+    if (std::error_code EC =<br>
             handle<ReadMem>(Channel, [&](TargetAddress RSrc, uint64_t RSize) {<br>
               Src = reinterpret_cast<char *>(static_cast<uintptr_t>(RSrc));<br>
               Size = RSize;<br>
@@ -410,7 +414,7 @@ private:<br>
   std::error_code handleReserveMem() {<br>
     void *LocalAllocAddr = nullptr;<br>
<br>
-    if (auto EC =<br>
+    if (std::error_code EC =<br>
             handle<ReserveMem>(Channel, [&](ResourceIdMgr::ResourceId Id,<br>
                                             uint64_t Size, uint32_t Align) {<br>
               auto I = Allocators.find(Id);<br>
<br>
<br>
_______________________________________________<br>
llvm-commits mailing list<br>
<a href="mailto:llvm-commits@lists.llvm.org">llvm-commits@lists.llvm.org</a><br>
<a href="http://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-commits" rel="noreferrer" target="_blank">http://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-commits</a><br>
</blockquote></div><br></div>