LLVM 23.0.0git
llvm::PassInfoMixin< DerivedT > Struct Template Reference

A CRTP mix-in to automatically provide informational APIs needed for passes. More...

#include "llvm/IR/PassManager.h"

Inherits llvm::detail::InfoMixin< DerivedT >.

Inherited by llvm::OptionalPassInfoMixin< DerivedT >, and llvm::RequiredPassInfoMixin< DerivedT >.

Public Member Functions

void printPipeline (raw_ostream &OS, function_ref< StringRef(StringRef)> MapClassName2PassName)

Static Public Member Functions

static bool isRequired ()
Static Public Member Functions inherited from llvm::detail::InfoMixin< DerivedT >
static StringRef name ()
 Gets the name of the pass we are mixed into.

Detailed Description

template<typename DerivedT>
struct llvm::PassInfoMixin< DerivedT >

A CRTP mix-in to automatically provide informational APIs needed for passes.

This provides some boilerplate for types that are passes.

Actual passes should inherit from RequiredPassInfoMixin or OptionalPassInfoMixin.

TODO: move to a detail namespace once we've branched for LLVM 23.

Definition at line 89 of file PassManager.h.

Member Function Documentation

◆ isRequired()

template<typename DerivedT>
bool llvm::PassInfoMixin< DerivedT >::isRequired ( )
inlinestatic

Definition at line 98 of file PassManager.h.

◆ printPipeline()

template<typename DerivedT>
void llvm::PassInfoMixin< DerivedT >::printPipeline ( raw_ostream & OS,
function_ref< StringRef(StringRef)> MapClassName2PassName )
inline

Definition at line 90 of file PassManager.h.

References PassName.

Referenced by llvm::LintPass::printPipeline().


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