xref: /netbsd-src/external/apache2/llvm/dist/llvm/include/llvm-c/Support.h (revision 82d56013d7b633d116a93943de88e08335357a7c)
17330f729Sjoerg /*===-- llvm-c/Support.h - Support C Interface --------------------*- C -*-===*\
27330f729Sjoerg |*                                                                            *|
37330f729Sjoerg |* Part of the LLVM Project, under the Apache License v2.0 with LLVM          *|
47330f729Sjoerg |* Exceptions.                                                                *|
57330f729Sjoerg |* See https://llvm.org/LICENSE.txt for license information.                  *|
67330f729Sjoerg |* SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception                    *|
77330f729Sjoerg |*                                                                            *|
87330f729Sjoerg |*===----------------------------------------------------------------------===*|
97330f729Sjoerg |*                                                                            *|
107330f729Sjoerg |* This file defines the C interface to the LLVM support library.             *|
117330f729Sjoerg |*                                                                            *|
127330f729Sjoerg \*===----------------------------------------------------------------------===*/
137330f729Sjoerg 
147330f729Sjoerg #ifndef LLVM_C_SUPPORT_H
157330f729Sjoerg #define LLVM_C_SUPPORT_H
167330f729Sjoerg 
177330f729Sjoerg #include "llvm-c/DataTypes.h"
18*82d56013Sjoerg #include "llvm-c/ExternC.h"
197330f729Sjoerg #include "llvm-c/Types.h"
207330f729Sjoerg 
21*82d56013Sjoerg LLVM_C_EXTERN_C_BEGIN
227330f729Sjoerg 
237330f729Sjoerg /**
247330f729Sjoerg  * This function permanently loads the dynamic library at the given path.
257330f729Sjoerg  * It is safe to call this function multiple times for the same library.
267330f729Sjoerg  *
277330f729Sjoerg  * @see sys::DynamicLibrary::LoadLibraryPermanently()
287330f729Sjoerg   */
297330f729Sjoerg LLVMBool LLVMLoadLibraryPermanently(const char* Filename);
307330f729Sjoerg 
317330f729Sjoerg /**
327330f729Sjoerg  * This function parses the given arguments using the LLVM command line parser.
337330f729Sjoerg  * Note that the only stable thing about this function is its signature; you
347330f729Sjoerg  * cannot rely on any particular set of command line arguments being interpreted
357330f729Sjoerg  * the same way across LLVM versions.
367330f729Sjoerg  *
377330f729Sjoerg  * @see llvm::cl::ParseCommandLineOptions()
387330f729Sjoerg  */
397330f729Sjoerg void LLVMParseCommandLineOptions(int argc, const char *const *argv,
407330f729Sjoerg                                  const char *Overview);
417330f729Sjoerg 
427330f729Sjoerg /**
437330f729Sjoerg  * This function will search through all previously loaded dynamic
447330f729Sjoerg  * libraries for the symbol \p symbolName. If it is found, the address of
457330f729Sjoerg  * that symbol is returned. If not, null is returned.
467330f729Sjoerg  *
477330f729Sjoerg  * @see sys::DynamicLibrary::SearchForAddressOfSymbol()
487330f729Sjoerg  */
497330f729Sjoerg void *LLVMSearchForAddressOfSymbol(const char *symbolName);
507330f729Sjoerg 
517330f729Sjoerg /**
527330f729Sjoerg  * This functions permanently adds the symbol \p symbolName with the
537330f729Sjoerg  * value \p symbolValue.  These symbols are searched before any
547330f729Sjoerg  * libraries.
557330f729Sjoerg  *
567330f729Sjoerg  * @see sys::DynamicLibrary::AddSymbol()
577330f729Sjoerg  */
587330f729Sjoerg void LLVMAddSymbol(const char *symbolName, void *symbolValue);
597330f729Sjoerg 
60*82d56013Sjoerg LLVM_C_EXTERN_C_END
617330f729Sjoerg 
627330f729Sjoerg #endif
63