|
|
|||
File indexing completed on 2026-05-10 08:43:52
0001 //===-- TargetExecutionUtils.h - Utils for execution in target --*- C++ -*-===// 0002 // 0003 // Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. 0004 // See https://llvm.org/LICENSE.txt for license information. 0005 // SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception 0006 // 0007 //===----------------------------------------------------------------------===// 0008 // 0009 // Utilities for execution in the target process. 0010 // 0011 //===----------------------------------------------------------------------===// 0012 0013 #ifndef LLVM_EXECUTIONENGINE_ORC_TARGETPROCESS_TARGETEXECUTIONUTILS_H 0014 #define LLVM_EXECUTIONENGINE_ORC_TARGETPROCESS_TARGETEXECUTIONUTILS_H 0015 0016 #include "llvm/ADT/ArrayRef.h" 0017 #include "llvm/ADT/StringRef.h" 0018 #include <string> 0019 0020 namespace llvm { 0021 namespace orc { 0022 0023 /// Run a main function, returning the result. 0024 /// 0025 /// If the optional ProgramName argument is given then it will be inserted 0026 /// before the strings in Args as the first argument to the called function. 0027 /// 0028 /// It is legal to have an empty argument list and no program name, however 0029 /// many main functions will expect a name argument at least, and will fail 0030 /// if none is provided. 0031 int runAsMain(int (*Main)(int, char *[]), ArrayRef<std::string> Args, 0032 std::optional<StringRef> ProgramName = std::nullopt); 0033 0034 int runAsVoidFunction(int (*Func)(void)); 0035 int runAsIntFunction(int (*Func)(int), int Arg); 0036 0037 } // end namespace orc 0038 } // end namespace llvm 0039 0040 #endif // LLVM_EXECUTIONENGINE_ORC_TARGETPROCESS_TARGETEXECUTIONUTILS_H
| [ Source navigation ] | [ Diff markup ] | [ Identifier search ] | [ general search ] |
|
This page was automatically generated by the 2.3.7 LXR engine. The LXR team |
|