[PATCH] Augment the C API

Eli Bendersky eliben at google.com
Tue Jun 9 08:34:41 PDT 2015


Do you have commit rights, Antoine?

On Mon, Jun 8, 2015 at 2:43 AM, Antoine Pitrou <pitrou at free.fr> wrote:

> Here is a new patch without the optimization settings APIs.
>
>
> REPOSITORY
>   rL LLVM
>
> http://reviews.llvm.org/D10222
>
> Files:
>   include/llvm-c/Support.h
>   lib/Support/DynamicLibrary.cpp
>
> Index: include/llvm-c/Support.h
> ===================================================================
> --- include/llvm-c/Support.h
> +++ include/llvm-c/Support.h
> @@ -58,6 +58,24 @@
>  void LLVMParseCommandLineOptions(int argc, const char *const *argv,
>                                   const char *Overview);
>
> +/**
> + * This function will search through all previously loaded dynamic
> + * libraries for the symbol \p symbolName. If it is found, the address of
> + * that symbol is returned. If not, null is returned.
> + *
> + * @see sys::DynamicLibrary::SearchForAddressOfSymbol()
> + */
> +void *LLVMSearchForAddressOfSymbol(const char *symbolName);
> +
> +/**
> + * This functions permanently adds the symbol \p symbolName with the
> + * value \p symbolValue.  These symbols are searched before any
> + * libraries.
> + *
> + * @see sys::DynamicLibrary::AddSymbol()
> + */
> +void LLVMAddSymbol(const char *symbolName, void *symbolValue);
> +
>  #ifdef __cplusplus
>  }
>  #endif
> Index: lib/Support/DynamicLibrary.cpp
> ===================================================================
> --- lib/Support/DynamicLibrary.cpp
> +++ lib/Support/DynamicLibrary.cpp
> @@ -178,3 +178,12 @@
>  LLVMBool LLVMLoadLibraryPermanently(const char* Filename) {
>    return llvm::sys::DynamicLibrary::LoadLibraryPermanently(Filename);
>  }
> +
> +void *LLVMSearchForAddressOfSymbol(const char *symbolName) {
> +  return llvm::sys::DynamicLibrary::SearchForAddressOfSymbol(symbolName);
> +}
> +
> +void LLVMAddSymbol(const char *symbolName, void *symbolValue) {
> +  return llvm::sys::DynamicLibrary::AddSymbol(symbolName, symbolValue);
> +}
> +
>
> EMAIL PREFERENCES
>   http://reviews.llvm.org/settings/panel/emailpreferences/
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20150609/767027e9/attachment.html>


More information about the llvm-commits mailing list