22 return make_error<StringError>(
Twine(
"Could not load library '") +
23 Filename +
"': " +
Error,
28 (
intptr_t)Library.SearchForAddressOfSymbol(
"llvmGetPassPluginInfo");
33 return make_error<StringError>(
Twine(
"Plugin entry point not found in '") +
34 Filename +
"'. Is this a legacy plugin?",
40 return make_error<StringError>(
41 Twine(
"Wrong API version on plugin '") + Filename +
"'. Got version " +
42 Twine(
P.Info.APIVersion) +
", supported version is " +
46 if (!
P.Info.RegisterPassBuilderCallbacks)
47 return make_error<StringError>(
Twine(
"Empty entry callback in plugin '") +
This class represents lattice values for constants.
Twine - A lightweight data structure for efficiently representing the concatenation of temporary valu...
Tagged union holding either a T or a Error.
::llvm::PassPluginLibraryInfo LLVM_ATTRIBUTE_WEAK llvmGetPassPluginInfo()
The public entry point for a pass plugin.
static Expected< PassPlugin > Load(const std::string &Filename)
Attempts to load a pass plugin from a given file.
bool isValid() const
Returns true if the object refers to a valid library.
static DynamicLibrary getPermanentLibrary(const char *filename, std::string *errMsg=nullptr)
This function permanently loads the dynamic library at the given path.
#define LLVM_PLUGIN_API_VERSION
LLVM_PLUGIN_API_VERSION Identifies the API version understood by this plugin.
std::error_code inconvertibleErrorCode()
The value returned by this function can be returned from convertToErrorCode for Error values where no...