LLVM 19.0.0git
Public Member Functions | Protected Member Functions | List of all members
llvm::DOTGraphTraitsViewer< AnalysisT, IsSimple, GraphT, AnalysisGraphTraitsT > Struct Template Reference

#include "llvm/Analysis/DOTGraphTraitsPass.h"

Inheritance diagram for llvm::DOTGraphTraitsViewer< AnalysisT, IsSimple, GraphT, AnalysisGraphTraitsT >:
Inheritance graph
[legend]

Public Member Functions

 DOTGraphTraitsViewer (StringRef GraphName)
 
virtual bool processFunction (Function &F, const typename AnalysisT::Result &Result)
 Return true if this function should be processed.
 
PreservedAnalyses run (Function &F, FunctionAnalysisManager &FAM)
 
- Public Member Functions inherited from llvm::PassInfoMixin< DerivedT >
void printPipeline (raw_ostream &OS, function_ref< StringRef(StringRef)> MapClassName2PassName)
 

Protected Member Functions

 ~DOTGraphTraitsViewer ()
 Avoid compiler warning "has virtual functions but non-virtual destructor [-Wnon-virtual-dtor]" in derived classes.
 

Additional Inherited Members

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

Detailed Description

template<typename AnalysisT, bool IsSimple, typename GraphT = typename AnalysisT::Result *, typename AnalysisGraphTraitsT = DefaultAnalysisGraphTraits<typename AnalysisT::Result &, GraphT>>
struct llvm::DOTGraphTraitsViewer< AnalysisT, IsSimple, GraphT, AnalysisGraphTraitsT >

Definition at line 46 of file DOTGraphTraitsPass.h.

Constructor & Destructor Documentation

◆ DOTGraphTraitsViewer()

template<typename AnalysisT , bool IsSimple, typename GraphT = typename AnalysisT::Result *, typename AnalysisGraphTraitsT = DefaultAnalysisGraphTraits<typename AnalysisT::Result &, GraphT>>
llvm::DOTGraphTraitsViewer< AnalysisT, IsSimple, GraphT, AnalysisGraphTraitsT >::DOTGraphTraitsViewer ( StringRef  GraphName)
inline

Definition at line 49 of file DOTGraphTraitsPass.h.

◆ ~DOTGraphTraitsViewer()

template<typename AnalysisT , bool IsSimple, typename GraphT = typename AnalysisT::Result *, typename AnalysisGraphTraitsT = DefaultAnalysisGraphTraits<typename AnalysisT::Result &, GraphT>>
llvm::DOTGraphTraitsViewer< AnalysisT, IsSimple, GraphT, AnalysisGraphTraitsT >::~DOTGraphTraitsViewer ( )
inlineprotected

Avoid compiler warning "has virtual functions but non-virtual destructor [-Wnon-virtual-dtor]" in derived classes.

DOTGraphTraitsViewer is also used as a mixin for avoiding repeated implementation of viewer passes, ie there should be no runtime-polymorphisms/downcasting involving this class and hence no virtual destructor needed. Making this dtor protected stops accidental invocation when the derived class destructor should have been called. Those derived classes sould be marked final to avoid the warning.

Definition at line 83 of file DOTGraphTraitsPass.h.

Member Function Documentation

◆ processFunction()

template<typename AnalysisT , bool IsSimple, typename GraphT = typename AnalysisT::Result *, typename AnalysisGraphTraitsT = DefaultAnalysisGraphTraits<typename AnalysisT::Result &, GraphT>>
virtual bool llvm::DOTGraphTraitsViewer< AnalysisT, IsSimple, GraphT, AnalysisGraphTraitsT >::processFunction ( Function F,
const typename AnalysisT::Result &  Result 
)
inlinevirtual

Return true if this function should be processed.

An implementation of this class my override this function to indicate that only certain functions should be viewed.

Parameters
ResultThe current analysis result for this function.

Definition at line 57 of file DOTGraphTraitsPass.h.

Referenced by llvm::DOTGraphTraitsViewer< AnalysisT, IsSimple, GraphT, AnalysisGraphTraitsT >::run().

◆ run()

template<typename AnalysisT , bool IsSimple, typename GraphT = typename AnalysisT::Result *, typename AnalysisGraphTraitsT = DefaultAnalysisGraphTraits<typename AnalysisT::Result &, GraphT>>
PreservedAnalyses llvm::DOTGraphTraitsViewer< AnalysisT, IsSimple, GraphT, AnalysisGraphTraitsT >::run ( Function F,
FunctionAnalysisManager FAM 
)
inline

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