Updates ExecutionSession::runJITDispatchHandler to take the argument
buffer for the function as a WrapperFunctionBuffer, rather than an
ArrayRef<char>.
This is a first step towards more efficient jit-dispatch handler calls:
1. Handlers can now be run as tasks, since they own their argument
buffer (so there's no risk of it being deallocated before they're run)
2. In in-process JIT setups, this will allow argument buffers to be
passed in directly from the ORC runtime, rather than having to copy the
buffer.
Also renames CWrapperFunctionResult to CWrapperFunctionBuffer.
These types are used as argument buffers, as well as result buffers. The
new name better reflects their purpose, and is consistent with naming in
the new ORC runtime (llvm-project/orc-rt).
The WrapperFunctionBuffer(CWrapperFunctionBuffer) constructor takes
ownership of the underlying buffer (if one exists). Making the
constructor explicit makes this clearer at the call site.
This patch adds the new **executor-side resolver API** as suggested by
@lhames. It introduces a `DylibSymbolResolver` that helps resolve
symbols for each loaded dylib.
Previously, we returned a `DylibHandle` to the controller. Now, we wrap
the native handle inside `DylibSymbolResolver` and return a
`ResolverHandle` instead. This makes the code cleaner and separates the
symbol resolution logic from raw handle management.
This moves the MemoryAccess interface out of the ExecutorProcessControl
class and splits implementation classes InProcessMemoryManager and
SelfExecutorProcessControl out of ExecutorProcessControl.h and into
their own headers.