mirror of
https://github.com/RPCS3/llvm-mirror.git
synced 2024-11-22 02:33:06 +01:00
[ORC] Use uint8_t rather than char for RPC wrapper-function calls.
This partially reverts 838490de7ed, which broke some Solaris bots. Apparently Solaris defines int8_t as char rather than signed char, which made the SerializationTypeName<char> specialization a redefinition. This partial revert isolates use of uint8_t buffers to ORC-RPC handling of wrapper functions only. The TargetProcessControl::runWrapper method will continue to use char buffers.
This commit is contained in:
parent
04c9dcdc5d
commit
eb023bd323
@ -362,8 +362,10 @@ public:
|
||||
<< formatv("{0:x16}", WrapperFnAddr) << " with "
|
||||
<< formatv("{0:x16}", ArgBuffer.size()) << " argument buffer\n";
|
||||
});
|
||||
auto Result =
|
||||
EP.template callB<orcrpctpc::RunWrapper>(WrapperFnAddr, ArgBuffer);
|
||||
auto Result = EP.template callB<orcrpctpc::RunWrapper>(
|
||||
WrapperFnAddr,
|
||||
ArrayRef<uint8_t>(reinterpret_cast<const uint8_t *>(ArgBuffer.data()),
|
||||
ArgBuffer.size()));
|
||||
return Result;
|
||||
}
|
||||
|
||||
|
@ -58,11 +58,6 @@ public:
|
||||
static const char *getName() { return "void"; }
|
||||
};
|
||||
|
||||
template <> class SerializationTypeName<char> {
|
||||
public:
|
||||
static const char *getName() { return "char"; }
|
||||
};
|
||||
|
||||
template <> class SerializationTypeName<int8_t> {
|
||||
public:
|
||||
static const char *getName() { return "int8_t"; }
|
||||
|
@ -358,7 +358,7 @@ public:
|
||||
class RunWrapper
|
||||
: public shared::RPCFunction<RunWrapper,
|
||||
shared::WrapperFunctionResult(
|
||||
JITTargetAddress, std::vector<char>)> {
|
||||
JITTargetAddress, std::vector<uint8_t>)> {
|
||||
public:
|
||||
static const char *getName() { return "RunWrapper"; }
|
||||
};
|
||||
@ -580,12 +580,14 @@ private:
|
||||
ProgramNameOverride);
|
||||
}
|
||||
|
||||
shared::WrapperFunctionResult runWrapper(JITTargetAddress WrapperFnAddr,
|
||||
const std::vector<char> &ArgBuffer) {
|
||||
shared::WrapperFunctionResult
|
||||
runWrapper(JITTargetAddress WrapperFnAddr,
|
||||
const std::vector<uint8_t> &ArgBuffer) {
|
||||
using WrapperFnTy = shared::detail::CWrapperFunctionResult (*)(
|
||||
const char *Data, uint64_t Size);
|
||||
auto *WrapperFn = jitTargetAddressToFunction<WrapperFnTy>(WrapperFnAddr);
|
||||
return WrapperFn(ArgBuffer.data(), ArgBuffer.size());
|
||||
return WrapperFn(reinterpret_cast<const char *>(ArgBuffer.data()),
|
||||
ArgBuffer.size());
|
||||
}
|
||||
|
||||
void closeConnection() { Finished = true; }
|
||||
|
Loading…
Reference in New Issue
Block a user