1 /*===-- llvm-c/Support.h - Support C Interface --------------------*- C -*-===*\
2 |*                                                                            *|
3 |*                     The LLVM Compiler Infrastructure                       *|
4 |*                                                                            *|
5 |* This file is distributed under the University of Illinois Open Source      *|
6 |* License. See LICENSE.TXT for details.                                      *|
7 |*                                                                            *|
8 |*===----------------------------------------------------------------------===*|
9 |*                                                                            *|
10 |* This file defines the C interface to the LLVM support library.             *|
11 |*                                                                            *|
12 \*===----------------------------------------------------------------------===*/
13 
14 module llvm.c.support;
15 
16 public import llvm.c.types;
17 
18 extern(C) nothrow:
19 
20 /**
21  * This function permanently loads the dynamic library at the given path.
22  * It is safe to call this function multiple times for the same library.
23  *
24  * @see sys::DynamicLibrary::LoadLibraryPermanently()
25   */
26 LLVMBool LLVMLoadLibraryPermanently(const(char)* Filename);
27 
28 /**
29  * This function parses the given arguments using the LLVM command line parser.
30  * Note that the only stable thing about this function is its signature; you
31  * cannot rely on any particular set of command line arguments being interpreted
32  * the same way across LLVM versions.
33  *
34  * @see llvm::cl::ParseCommandLineOptions()
35  */
36 void LLVMParseCommandLineOptions(int argc, const(char*)* argv,
37                                  const(char)* Overview);
38 
39 /**
40  * This function will search through all previously loaded dynamic
41  * libraries for the symbol \p symbolName. If it is found, the address of
42  * that symbol is returned. If not, null is returned.
43  *
44  * @see sys::DynamicLibrary::SearchForAddressOfSymbol()
45  */
46 void *LLVMSearchForAddressOfSymbol(const(char)* symbolName);
47 
48 /**
49  * This functions permanently adds the symbol \p symbolName with the
50  * value \p symbolValue.  These symbols are searched before any
51  * libraries.
52  *
53  * @see sys::DynamicLibrary::AddSymbol()
54  */
55 void LLVMAddSymbol(const(char)* symbolName, void* symbolValue);