13#ifndef LLVM_SUPPORT_DYNAMICLIBRARY_H 
   14#define LLVM_SUPPORT_DYNAMICLIBRARY_H 
   50  bool isValid()
 const { 
return Data != &Invalid; }
 
   88                                     std::string *ErrMsg = 
nullptr) {
 
 
  103                                            std::string *Err = 
nullptr);
 
 
StringRef - Represent a constant reference to a string, i.e.
 
This class provides a portable interface to dynamic libraries which also might be known as shared lib...
 
static LLVM_ABI DynamicLibrary getLibrary(const char *FileName, std::string *Err=nullptr)
This function loads the dynamic library at the given path, using the library load operation from the ...
 
static LLVM_ABI DynamicLibrary addPermanentLibrary(void *handle, std::string *errMsg=nullptr)
Registers an externally loaded library.
 
static LLVM_ABI void AddSymbol(StringRef symbolName, void *symbolValue)
This functions permanently adds the symbol symbolName with the value symbolValue.
 
void * getOSSpecificHandle() const
Return the OS specific handle value.
 
static bool LoadLibraryPermanently(const char *Filename, std::string *ErrMsg=nullptr)
This function permanently loads the dynamic library at the given path.
 
DynamicLibrary(void *data=&Invalid)
 
static void * SearchForAddressOfSymbol(const std::string &symbolName)
Convenience function for C++ophiles.
 
@ SO_LoadedLast
SO_LoadedLast - Search as SO_Linker would, then loaded libraries.
 
@ SO_LoadOrder
SO_LoadOrder - Or this in to search libraries in the ordered loaded.
 
@ SO_Linker
SO_Linker - Search as a call to dlsym(dlopen(NULL)) would when DynamicLibrary::getPermanentLibrary(NU...
 
@ SO_LoadedFirst
SO_LoadedFirst - Search all loaded libraries, then as SO_Linker would.
 
static LLVM_ABI DynamicLibrary getPermanentLibrary(const char *filename, std::string *errMsg=nullptr)
This function permanently loads the dynamic library at the given path using the library load operatio...
 
static LLVM_ABI SearchOrdering SearchOrder
 
LLVM_ABI void * getAddressOfSymbol(const char *symbolName)
Searches through the library for the symbol symbolName.
 
bool isValid() const
Returns true if the object refers to a valid library.
 
static LLVM_ABI void * SearchForAddressOfSymbol(const char *symbolName)
This function will search through all previously loaded dynamic libraries for the symbol symbolName.
 
static LLVM_ABI void closeLibrary(DynamicLibrary &Lib)
This function closes the dynamic library at the given path, using the library close operation of the ...
 
This is an optimization pass for GlobalISel generic memory operations.