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 rt::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_RTBRIDGE_CALLPROXIES_H
15#define LLVM_EXECUTIONENGINE_ORC_RTBRIDGE_CALLPROXIES_H
16
17#include "llvm/ADT/ArrayRef.h"
19
20#include <cstdint>
21#include <string>
22
23namespace llvm::orc::rt {
24
25/// Runtime-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/// Runtime-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/// Runtime-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/// Runtime-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::rt
56
57#endif // LLVM_EXECUTIONENGINE_ORC_RTBRIDGE_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< void(ExecutorAddr)> CallVoidVoidProxy
Runtime-agnostic interface for running a void() function in the executor.
Definition CallProxies.h:37
Proxy< int32_t(ExecutorAddr, int32_t)> CallInt32Int32Proxy
Runtime-agnostic interface for running an int32_t(int32_t) function in the executor.
Definition CallProxies.h:53
Proxy< int32_t(ExecutorAddr)> CallInt32VoidProxy
Runtime-agnostic interface for running an int32_t() function in the executor.
Definition CallProxies.h:45
Proxy< int64_t(ExecutorAddr, ArrayRef< std::string >)> CallMainProxy
Runtime-agnostic interface for running a main-like function (int(int argc, char *argv[])) in the exec...
Definition CallProxies.h:30