1 /*===-- llvm-c/Support.h - Support C Interface --------------------*- C -*-===*\
3 |* Part of the LLVM Project, under the Apache License v2.0 with LLVM *|
5 |* See https://llvm.org/LICENSE.txt for license information. *|
6 |* SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception *|
8 |*===----------------------------------------------------------------------===*|
10 |* This file defines the C interface to the LLVM support library. *|
12 \*===----------------------------------------------------------------------===*/
14 #ifndef LLVM_C_SUPPORT_H
15 #define LLVM_C_SUPPORT_H
17 #include "llvm-c/DataTypes.h"
18 #include "llvm-c/ExternC.h"
19 #include "llvm-c/Types.h"
24 * This function permanently loads the dynamic library at the given path.
25 * It is safe to call this function multiple times for the same library.
27 * @see sys::DynamicLibrary::LoadLibraryPermanently()
29 LLVMBool
LLVMLoadLibraryPermanently(const char* Filename
);
32 * This function parses the given arguments using the LLVM command line parser.
33 * Note that the only stable thing about this function is its signature; you
34 * cannot rely on any particular set of command line arguments being interpreted
35 * the same way across LLVM versions.
37 * @see llvm::cl::ParseCommandLineOptions()
39 void LLVMParseCommandLineOptions(int argc
, const char *const *argv
,
40 const char *Overview
);
43 * This function will search through all previously loaded dynamic
44 * libraries for the symbol \p symbolName. If it is found, the address of
45 * that symbol is returned. If not, null is returned.
47 * @see sys::DynamicLibrary::SearchForAddressOfSymbol()
49 void *LLVMSearchForAddressOfSymbol(const char *symbolName
);
52 * This functions permanently adds the symbol \p symbolName with the
53 * value \p symbolValue. These symbols are searched before any
56 * @see sys::DynamicLibrary::AddSymbol()
58 void LLVMAddSymbol(const char *symbolName
, void *symbolValue
);