MLIR  20.0.0git
Public Member Functions | Static Public Member Functions | List of all members
mlir::DialectPlugin Class Reference

A loaded dialect plugin. More...

#include "mlir/Tools/Plugins/DialectPlugin.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 registerDialectRegistryCallbacks (DialectRegistry &dialectRegistry) const
 Invoke the DialectRegistry callback registration. More...
 

Static Public Member Functions

static llvm::Expected< DialectPluginload (const std::string &filename)
 Attempts to load a dialect plugin from a given file. More...
 

Detailed Description

A loaded dialect plugin.

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

Definition at line 51 of file DialectPlugin.h.

Member Function Documentation

◆ getAPIVersion()

uint32_t mlir::DialectPlugin::getAPIVersion ( ) const
inline

Get the plugin API version.

Definition at line 70 of file DialectPlugin.h.

References mlir::DialectPluginLibraryInfo::apiVersion.

◆ getFilename()

StringRef mlir::DialectPlugin::getFilename ( ) const
inline

Get the filename of the loaded plugin.

Definition at line 61 of file DialectPlugin.h.

◆ getPluginName()

StringRef mlir::DialectPlugin::getPluginName ( ) const
inline

Get the plugin name.

Definition at line 64 of file DialectPlugin.h.

References mlir::DialectPluginLibraryInfo::pluginName.

◆ getPluginVersion()

StringRef mlir::DialectPlugin::getPluginVersion ( ) const
inline

Get the plugin version.

Definition at line 67 of file DialectPlugin.h.

References mlir::DialectPluginLibraryInfo::pluginVersion.

◆ load()

llvm::Expected< DialectPlugin > DialectPlugin::load ( const std::string &  filename)
static

Attempts to load a dialect 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 DialectPlugin.cpp.

References MLIR_PLUGIN_API_VERSION, and mlirGetDialectPluginInfo().

◆ registerDialectRegistryCallbacks()

void mlir::DialectPlugin::registerDialectRegistryCallbacks ( DialectRegistry dialectRegistry) const
inline

Invoke the DialectRegistry callback registration.

Definition at line 74 of file DialectPlugin.h.

References mlir::DialectPluginLibraryInfo::registerDialectRegistryCallbacks.


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