clang 23.0.0git
clang::ssaf::AnalysisRegistry Class Reference

Unified registry for SummaryAnalysis and DerivedAnalysis implementations. More...

#include "clang/ScalableStaticAnalysisFramework/Core/WholeProgramAnalysis/AnalysisRegistry.h"

Classes

struct  Add
 Registers AnalysisT with the unified registry. More...

Static Public Member Functions

static bool contains (const AnalysisName &Name)
 Returns true if an analysis is registered under Name.
static const std::vector< AnalysisName > & names ()
 Returns the names of all registered analyses.
static llvm::Expected< std::unique_ptr< AnalysisBase > > instantiate (const AnalysisName &Name)
 Instantiates the analysis registered under Name, or returns an error if no such analysis is registered.

Detailed Description

Unified registry for SummaryAnalysis and DerivedAnalysis implementations.

Internally uses a single llvm::Registry<AnalysisBase>. The correct kind is carried by the AnalysisBase::TheKind tag set in each subclass constructor.

Definition at line 51 of file AnalysisRegistry.h.

Member Function Documentation

◆ contains()

bool AnalysisRegistry::contains ( const AnalysisName & Name)
static

Returns true if an analysis is registered under Name.

Definition at line 27 of file AnalysisRegistry.cpp.

Referenced by clang::ssaf::AnalysisRegistry::Add< AnalysisT >::Add().

◆ instantiate()

llvm::Expected< std::unique_ptr< AnalysisBase > > AnalysisRegistry::instantiate ( const AnalysisName & Name)
static

Instantiates the analysis registered under Name, or returns an error if no such analysis is registered.

Definition at line 36 of file AnalysisRegistry.cpp.

References clang::ssaf::ErrorBuilder::build(), clang::ssaf::ErrorBuilder::create(), and clang::ssaf::AnalysisName::str().

◆ names()

const std::vector< AnalysisName > & AnalysisRegistry::names ( )
static

Returns the names of all registered analyses.

Definition at line 31 of file AnalysisRegistry.cpp.

Referenced by clang::ssaf::AnalysisDriver::run().


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