LLVM 24.0.0git
CallProxies.h
Go to the documentation of this file.
1//===------- CallProxies.h - Proxies for running functions ------*- C++ -*-===//
2//
3// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
4// See https://llvm.org/LICENSE.txt for license information.
5// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
6//
7//===----------------------------------------------------------------------===//
8//
9// Named Proxy types for running functions in the executor. Each takes the
10// target function's ExecutorAddr (plus any arguments) and runs it.
11//
12//===----------------------------------------------------------------------===//
13
14#ifndef LLVM_EXECUTIONENGINE_ORC_CALLPROXIES_H
15#define LLVM_EXECUTIONENGINE_ORC_CALLPROXIES_H
16
17#include "llvm/ADT/ArrayRef.h"
19
20#include <cstdint>
21#include <string>
22
23namespace llvm::orc {
24
25/// Protocol-agnostic interface for running a main-like function
26/// (int(int argc, char *argv[])) in the executor.
27///
28/// The function to run is given by its ExecutorAddr, its arguments as an
29/// argument vector, and its int64_t result is returned.
31
32/// Protocol-agnostic interface for running a void() function in the executor.
33///
34/// The function to run is given by its ExecutorAddr.
35///
36/// WARNING: This Proxy is experimental and may be removed.
38
39/// Protocol-agnostic interface for running an int32_t() function in the
40/// executor.
41///
42/// The function to run is given by its ExecutorAddr.
43///
44/// WARNING: This Proxy is experimental and may be removed.
46
47/// Protocol-agnostic interface for running an int32_t(int32_t) function in the
48/// executor.
49///
50/// The function to run is given by its ExecutorAddr.
51///
52/// WARNING: This Proxy is experimental and may be removed.
53using CallInt32Int32Proxy = Proxy<int32_t(ExecutorAddr, int32_t)>;
54
55} // namespace llvm::orc
56
57#endif // LLVM_EXECUTIONENGINE_ORC_CALLPROXIES_H
Represent a constant reference to an array (0 or more elements consecutively in memory),...
Definition ArrayRef.h:40
Represents an address in the executor process.
Proxy< int64_t(ExecutorAddr, ArrayRef< std::string >)> CallMainProxy
Protocol-agnostic interface for running a main-like function (int(int argc, char *argv[])) in the exe...
Definition CallProxies.h:30
Proxy< void(ExecutorAddr)> CallVoidVoidProxy
Protocol-agnostic interface for running a void() function in the executor.
Definition CallProxies.h:37
Proxy< int32_t(ExecutorAddr)> CallInt32VoidProxy
Protocol-agnostic interface for running an int32_t() function in the executor.
Definition CallProxies.h:45
Proxy< int32_t(ExecutorAddr, int32_t)> CallInt32Int32Proxy
Protocol-agnostic interface for running an int32_t(int32_t) function in the executor.
Definition CallProxies.h:53