20 if (!Library.isValid())
22 Filename +
"': " +
Error,
25 PassPlugin
P{Filename, Library};
29 intptr_t getDetailsFn =
30 (intptr_t)Library.getAddressOfSymbol(
"llvmGetPassPluginInfo");
36 Filename +
"'. Is this a legacy plugin?",
43 Twine(
"Wrong API version on plugin '") + Filename +
"'. Got version " +
44 Twine(
P.Info.APIVersion) +
", supported version is " +
48 if (!
P.Info.RegisterPassBuilderCallbacks)
::llvm::PassPluginLibraryInfo LLVM_ATTRIBUTE_WEAK llvmGetPassPluginInfo()
The public entry point for a pass plugin.
#define LLVM_PLUGIN_API_VERSION
\macro LLVM_PLUGIN_API_VERSION Identifies the API version understood by this plugin.
Lightweight error class with error context and mandatory checking.
Tagged union holding either a T or a Error.
static LLVM_ABI Expected< PassPlugin > Load(const std::string &Filename)
Attempts to load a pass plugin from a given file.
Twine - A lightweight data structure for efficiently representing the concatenation of temporary valu...
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...
This is an optimization pass for GlobalISel generic memory operations.
LLVM_ABI std::error_code inconvertibleErrorCode()
The value returned by this function can be returned from convertToErrorCode for Error values where no...
Error make_error(ArgTs &&... Args)
Make a Error instance representing failure using the given error info type.