MLIR  16.0.0git
Public Member Functions | List of all members
mlir::TranslateToMLIRRegistration Struct Reference

Use Translate[ToMLIR|FromMLIR]Registration as an initializer that registers a function and associates it with name. More...

#include "mlir/Tools/mlir-translate/Translation.h"

Public Member Functions

 TranslateToMLIRRegistration (llvm::StringRef name, const TranslateSourceMgrToMLIRFunction &function)
 
 TranslateToMLIRRegistration (llvm::StringRef name, const TranslateStringRefToMLIRFunction &function)
 

Detailed Description

Use Translate[ToMLIR|FromMLIR]Registration as an initializer that registers a function and associates it with name.

This requires that a translation has not been registered to a given name.

Usage:

// At file scope. namespace mlir { void registerTRexToMLIRRegistration() { TranslateToMLIRRegistration Unused(&MySubCommand, [] { ... }); } } // namespace mlir

Definition at line 73 of file Translation.h.

Constructor & Destructor Documentation

◆ TranslateToMLIRRegistration() [1/2]

mlir::TranslateToMLIRRegistration::TranslateToMLIRRegistration ( llvm::StringRef  name,
const TranslateSourceMgrToMLIRFunction function 
)

◆ TranslateToMLIRRegistration() [2/2]

mlir::TranslateToMLIRRegistration::TranslateToMLIRRegistration ( llvm::StringRef  name,
const TranslateStringRefToMLIRFunction function 
)

The documentation for this struct was generated from the following file: