diff options
author | Stephen Hines <srhines@google.com> | 2014-04-23 16:57:46 -0700 |
---|---|---|
committer | Stephen Hines <srhines@google.com> | 2014-04-24 15:53:16 -0700 |
commit | 36b56886974eae4f9c5ebc96befd3e7bfe5de338 (patch) | |
tree | e6cfb69fbbd937f450eeb83bfb83b9da3b01275a /tools/lli/RPCChannel.h | |
parent | 69a8640022b04415ae9fac62f8ab090601d8f889 (diff) | |
download | external_llvm-36b56886974eae4f9c5ebc96befd3e7bfe5de338.tar.gz external_llvm-36b56886974eae4f9c5ebc96befd3e7bfe5de338.tar.bz2 external_llvm-36b56886974eae4f9c5ebc96befd3e7bfe5de338.zip |
Update to LLVM 3.5a.
Change-Id: Ifadecab779f128e62e430c2b4f6ddd84953ed617
Diffstat (limited to 'tools/lli/RPCChannel.h')
-rw-r--r-- | tools/lli/RPCChannel.h | 49 |
1 files changed, 49 insertions, 0 deletions
diff --git a/tools/lli/RPCChannel.h b/tools/lli/RPCChannel.h new file mode 100644 index 0000000000..2d8c708128 --- /dev/null +++ b/tools/lli/RPCChannel.h @@ -0,0 +1,49 @@ +//===---------- RPCChannel.h - LLVM out-of-process JIT execution ----------===// +// +// The LLVM Compiler Infrastructure +// +// This file is distributed under the University of Illinois Open Source +// License. See LICENSE.TXT for details. +// +//===----------------------------------------------------------------------===// +// +// Definition of the RemoteTargetExternal class which executes JITed code in a +// separate process from where it was built. +// +//===----------------------------------------------------------------------===// + +#ifndef LLI_RPCCHANNEL_H +#define LLI_RPCCHANNEL_H + +#include <stdlib.h> +#include <string> + +namespace llvm { + +class RPCChannel { +public: + std::string ChildName; + + RPCChannel() {} + ~RPCChannel(); + + /// Start the remote process. + /// + /// @returns True on success. On failure, ErrorMsg is updated with + /// descriptive text of the encountered error. + bool createServer(); + + bool createClient(); + + // This will get filled in as a point to an OS-specific structure. + void *ConnectionData; + + bool WriteBytes(const void *Data, size_t Size); + bool ReadBytes(void *Data, size_t Size); + + void Wait(); +}; + +} // end namespace llvm + +#endif // LLI_RPCCHANNEL_H |