[llvm] r257367 - Fix some GCC 4.7 issues with the new Orc remote JIT support
David Blaikie via llvm-commits
llvm-commits at lists.llvm.org
Mon Jan 11 11:26:01 PST 2016
Author: dblaikie
Date: Mon Jan 11 13:26:01 2016
New Revision: 257367
URL: http://llvm.org/viewvc/llvm-project?rev=257367&view=rev
Log:
Fix some GCC 4.7 issues with the new Orc remote JIT support
I'm still seeing GCC ICE locally, but figured I'd throw this at the wall
& see if it sticks for the bots at least. Will continue investigating
the ICE in any case.
Modified:
llvm/trunk/include/llvm/ExecutionEngine/Orc/OrcRemoteTargetClient.h
llvm/trunk/include/llvm/ExecutionEngine/Orc/OrcRemoteTargetServer.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=257367&r1=257366&r2=257367&view=diff
==============================================================================
--- llvm/trunk/include/llvm/ExecutionEngine/Orc/OrcRemoteTargetClient.h (original)
+++ llvm/trunk/include/llvm/ExecutionEngine/Orc/OrcRemoteTargetClient.h Mon Jan 11 13:26:01 2016
@@ -701,10 +701,11 @@ private:
if (auto EC = call<ReserveMem>(Channel, Id, Size, Align))
return EC;
- if (auto EC = expect<ReserveMemResponse>(Channel, [&](TargetAddress Addr) {
- RemoteAddr = Addr;
- return std::error_code();
- }))
+ if (std::error_code EC =
+ expect<ReserveMemResponse>(Channel, [&](TargetAddress Addr) {
+ RemoteAddr = Addr;
+ return std::error_code();
+ }))
return EC;
return std::error_code();
Modified: llvm/trunk/include/llvm/ExecutionEngine/Orc/OrcRemoteTargetServer.h
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/include/llvm/ExecutionEngine/Orc/OrcRemoteTargetServer.h?rev=257367&r1=257366&r2=257367&view=diff
==============================================================================
--- llvm/trunk/include/llvm/ExecutionEngine/Orc/OrcRemoteTargetServer.h (original)
+++ llvm/trunk/include/llvm/ExecutionEngine/Orc/OrcRemoteTargetServer.h Mon Jan 11 13:26:01 2016
@@ -163,13 +163,16 @@ private:
typedef int (*IntVoidFnTy)();
IntVoidFnTy Fn = nullptr;
- if (auto EC = handle<CallIntVoid>(Channel, [&](TargetAddress Addr) {
- Fn = reinterpret_cast<IntVoidFnTy>(static_cast<uintptr_t>(Addr));
- return std::error_code();
- }))
+ if (std::error_code EC =
+ handle<CallIntVoid>(Channel, [&](TargetAddress Addr) {
+ Fn = reinterpret_cast<IntVoidFnTy>(static_cast<uintptr_t>(Addr));
+ return std::error_code();
+ }))
return EC;
- DEBUG(dbgs() << " Calling " << reinterpret_cast<void *>(Fn) << "\n");
+ DEBUG(dbgs() << " Calling "
+ << reinterpret_cast<void *>(reinterpret_cast<intptr_t>(Fn))
+ << "\n");
int Result = Fn();
DEBUG(dbgs() << " Result = " << Result << "\n");
@@ -181,7 +184,7 @@ private:
MainFnTy Fn = nullptr;
std::vector<std::string> Args;
- if (auto EC = handle<CallMain>(
+ if (std::error_code EC = handle<CallMain>(
Channel, [&](TargetAddress Addr, std::vector<std::string> &A) {
Fn = reinterpret_cast<MainFnTy>(static_cast<uintptr_t>(Addr));
Args = std::move(A);
@@ -207,10 +210,11 @@ private:
typedef void (*VoidVoidFnTy)();
VoidVoidFnTy Fn = nullptr;
- if (auto EC = handle<CallIntVoid>(Channel, [&](TargetAddress Addr) {
- Fn = reinterpret_cast<VoidVoidFnTy>(static_cast<uintptr_t>(Addr));
- return std::error_code();
- }))
+ if (std::error_code EC =
+ handle<CallIntVoid>(Channel, [&](TargetAddress Addr) {
+ Fn = reinterpret_cast<VoidVoidFnTy>(static_cast<uintptr_t>(Addr));
+ return std::error_code();
+ }))
return EC;
DEBUG(dbgs() << " Calling " << reinterpret_cast<void *>(Fn) << "\n");
@@ -387,7 +391,7 @@ private:
std::error_code handleReadMem() {
char *Src = nullptr;
uint64_t Size = 0;
- if (auto EC =
+ if (std::error_code EC =
handle<ReadMem>(Channel, [&](TargetAddress RSrc, uint64_t RSize) {
Src = reinterpret_cast<char *>(static_cast<uintptr_t>(RSrc));
Size = RSize;
@@ -410,7 +414,7 @@ private:
std::error_code handleReserveMem() {
void *LocalAllocAddr = nullptr;
- if (auto EC =
+ if (std::error_code EC =
handle<ReserveMem>(Channel, [&](ResourceIdMgr::ResourceId Id,
uint64_t Size, uint32_t Align) {
auto I = Allocators.find(Id);
More information about the llvm-commits
mailing list