LLVM  8.0.1
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 61 of file PassPlugin.h.

Member Function Documentation

◆ getAPIVersion()

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

Get the plugin API version.

Definition at line 80 of file PassPlugin.h.

References Info.

◆ getFilename()

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

Get the filename of the loaded plugin.

Definition at line 71 of file PassPlugin.h.

◆ getPluginName()

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

Get the plugin name.

Definition at line 74 of file PassPlugin.h.

References Info.

◆ getPluginVersion()

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

Get the plugin version.

Definition at line 77 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 17 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 83 of file PassPlugin.h.

References Info.


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