Report lli remote IO errors consistently
This enables IO error reports in both the child and server processes.
The scheme still isn't entirely satisfactory and output is jumbled but it beats
having no output at all. This will hopefully unblock ARM support (PR18057).
llvm-svn: 200017
diff --git a/llvm/tools/lli/ChildTarget/ChildTarget.cpp b/llvm/tools/lli/ChildTarget/ChildTarget.cpp
index 1e3000d..4603496 100644
--- a/llvm/tools/lli/ChildTarget/ChildTarget.cpp
+++ b/llvm/tools/lli/ChildTarget/ChildTarget.cpp
@@ -34,9 +34,11 @@
// OS-specific functions
void initializeConnection();
int WriteBytes(const void *Data, size_t Size) {
- return RPC.WriteBytes(Data, Size);
+ return RPC.WriteBytes(Data, Size) ? Size : -1;
}
- int ReadBytes(void *Data, size_t Size) { return RPC.ReadBytes(Data, Size); }
+ int ReadBytes(void *Data, size_t Size) {
+ return RPC.ReadBytes(Data, Size) ? Size : -1;
+ }
// Communication handles (OS-specific)
void *ConnectionData;