[ORC-RT] Add OrcRTCWrapperFunctionResult.
authorLang Hames <lhames@gmail.com>
Sat, 29 May 2021 00:08:23 +0000 (17:08 -0700)
committerLang Hames <lhames@gmail.com>
Sun, 30 May 2021 18:20:57 +0000 (11:20 -0700)
commit442f2d7bc0bc4f19ce056018231fbed9166c9b08
treeea629a52234326cf0264c7ee6392e9a25e203bd8
parent2176be556b448361a35c01cfedd5d3fd54b3e2b9
[ORC-RT] Add OrcRTCWrapperFunctionResult.

OrcRTCWrapperFunctionResult is a C struct that can be used to return serialized
results from "wrapper functions" -- functions that deserialize an argument
buffer, call through to an actual implementation function, then serialize and
return the result of that function. Wrapper functions allow calls between ORC
and the ORC Runtime to be written using a single signature,
WrapperFunctionResult(const char *ArgData, size_t ArgSize), and without coupling
either side to a particular transport mechanism (in-memory, TCP, IPC, ... the
actual mechanism will be determined by the TargetProcessControl implementation).

OrcRTCWrapperFunctionResult is designed to allow small serialized buffers to
be returned by value, with larger serialized results stored on the heap. They
also provide an error state to report failures in serialization/deserialization.
compiler-rt/lib/orc/CMakeLists.txt
compiler-rt/lib/orc/c_api.h [new file with mode: 0644]
compiler-rt/lib/orc/unittests/CMakeLists.txt
compiler-rt/lib/orc/unittests/c_api_test.cpp [new file with mode: 0644]