LLVM  10.0.0svn
Public Member Functions | Static Public Member Functions | List of all members
llvm::PassPlugin Class Reference

A loaded pass plugin. More...

#include "llvm/Passes/PassPlugin.h"

Public Member Functions

StringRef getFilename () const
 Get the filename of the loaded plugin. More...
 
StringRef getPluginName () const
 Get the plugin name. More...
 
StringRef getPluginVersion () const
 Get the plugin version. More...
 
uint32_t getAPIVersion () const
 Get the plugin API version. More...
 
void registerPassBuilderCallbacks (PassBuilder &PB) const
 Invoke the PassBuilder callback registration. More...
 

Static Public Member Functions

static Expected< PassPluginLoad (const std::string &Filename)
 Attempts to load a pass plugin from a given file. More...
 

Detailed Description

A loaded pass plugin.

An instance of this class wraps a loaded pass plugin and gives access to its interface defined by the PassPluginLibraryInfo it exposes.

Definition at line 60 of file PassPlugin.h.

Member Function Documentation

◆ getAPIVersion()

uint32_t llvm::PassPlugin::getAPIVersion ( ) const
inline

Get the plugin API version.

Definition at line 79 of file PassPlugin.h.

References Info.

◆ getFilename()

StringRef llvm::PassPlugin::getFilename ( ) const
inline

Get the filename of the loaded plugin.

Definition at line 70 of file PassPlugin.h.

◆ getPluginName()

StringRef llvm::PassPlugin::getPluginName ( ) const
inline

Get the plugin name.

Definition at line 73 of file PassPlugin.h.

References Info.

◆ getPluginVersion()

StringRef llvm::PassPlugin::getPluginVersion ( ) const
inline

Get the plugin version.

Definition at line 76 of file PassPlugin.h.

References Info.

◆ Load()

Expected< PassPlugin > PassPlugin::Load ( const std::string &  Filename)
static

Attempts to load a pass plugin from a given file.

Returns
Returns an error if either the library cannot be found or loaded, there is no public entry point, or the plugin implements the wrong API version.

Definition at line 16 of file PassPlugin.cpp.

References llvm::Error, llvm::sys::DynamicLibrary::getPermanentLibrary(), llvm::inconvertibleErrorCode(), llvm::sys::DynamicLibrary::isValid(), LLVM_PLUGIN_API_VERSION, llvmGetPassPluginInfo(), and P.

◆ registerPassBuilderCallbacks()

void llvm::PassPlugin::registerPassBuilderCallbacks ( PassBuilder PB) const
inline

Invoke the PassBuilder callback registration.

Definition at line 82 of file PassPlugin.h.

References Info.


The documentation for this class was generated from the following files: