14 #ifndef LLVM_SUPPORT_DYNAMICLIBRARY_H
15 #define LLVM_SUPPORT_DYNAMICLIBRARY_H
50 bool isValid()
const {
return Data != &Invalid; }
69 std::string *errMsg =
nullptr);
77 std::string *ErrMsg =
nullptr) {
static void * SearchForAddressOfSymbol(const char *symbolName)
This function will search through all previously loaded dynamic libraries for the symbol symbolName...
DynamicLibrary(void *data=&Invalid)
static void * SearchForAddressOfSymbol(const std::string &symbolName)
Convenience function for C++ophiles.
void * getAddressOfSymbol(const char *symbolName)
Searches through the library for the symbol symbolName.
static bool LoadLibraryPermanently(const char *Filename, std::string *ErrMsg=nullptr)
This function permanently loads the dynamic library at the given path.
This class provides a portable interface to dynamic libraries which also might be known as shared lib...
bool isValid() const
Returns true if the object refers to a valid library.
StringRef filename(StringRef path)
Get filename.
static void AddSymbol(StringRef symbolName, void *symbolValue)
This functions permanently adds the symbol symbolName with the value symbolValue. ...
static DynamicLibrary getPermanentLibrary(const char *filename, std::string *errMsg=nullptr)
This function permanently loads the dynamic library at the given path.
StringRef - Represent a constant reference to a string, i.e.