clang 23.0.0git
clang::ssaf::SummaryAnalysis< ResultT, EntitySummaryT > Class Template Referenceabstract

Typed intermediate that concrete summary analyses inherit from. More...

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

Inheritance diagram for clang::ssaf::SummaryAnalysis< ResultT, EntitySummaryT >:
[legend]

Public Member Functions

AnalysisName analysisName () const final
 Used by AnalysisRegistry::Add to derive the registry entry name.
SummaryName summaryName () const final
 SummaryName of the EntitySummary type this analysis consumes.
const std::vector< AnalysisName > & dependencyNames () const final
 AnalysisNames of all AnalysisResult dependencies.
virtual llvm::Error initialize () override
 Called once before the first add() call. Override for initialization.
virtual llvm::Error add (EntityId Id, const EntitySummaryT &Summary)=0
 Called once per matching entity. Implement to accumulate data.
virtual llvm::Error finalize () override
 Called after all entities have been processed.
Public Member Functions inherited from clang::ssaf::AnalysisBase
virtual ~AnalysisBase ()=default

Protected Member Functions

const ResultT & result () const &
 Read-only access to the result being built.
ResultT & result () &
 Mutable access to the result being built.
Protected Member Functions inherited from clang::ssaf::SummaryAnalysisBase
 SummaryAnalysisBase ()
Protected Member Functions inherited from clang::ssaf::AnalysisBase
 AnalysisBase (Kind K)

Friends

class AnalysisRegistry

Detailed Description

template<typename ResultT, typename EntitySummaryT>
class clang::ssaf::SummaryAnalysis< ResultT, EntitySummaryT >

Typed intermediate that concrete summary analyses inherit from.

Concrete analyses must implement: llvm::Error add(EntityId Id, const EntitySummaryT &Summary) override; and may override initialize() and finalize().

The result being built is accessible via result() const & (read-only) and result() & (mutable) within the analysis implementation.

Definition at line 70 of file SummaryAnalysis.h.

Member Function Documentation

◆ add()

template<typename ResultT, typename EntitySummaryT>
virtual llvm::Error clang::ssaf::SummaryAnalysis< ResultT, EntitySummaryT >::add ( EntityId Id,
const EntitySummaryT & Summary )
pure virtual

Called once per matching entity. Implement to accumulate data.

◆ analysisName()

template<typename ResultT, typename EntitySummaryT>
AnalysisName clang::ssaf::SummaryAnalysis< ResultT, EntitySummaryT >::analysisName ( ) const
inlinefinalvirtual

Used by AnalysisRegistry::Add to derive the registry entry name.

Implements clang::ssaf::AnalysisBase.

Definition at line 85 of file SummaryAnalysis.h.

◆ dependencyNames()

template<typename ResultT, typename EntitySummaryT>
const std::vector< AnalysisName > & clang::ssaf::SummaryAnalysis< ResultT, EntitySummaryT >::dependencyNames ( ) const
inlinefinalvirtual

AnalysisNames of all AnalysisResult dependencies.

Implements clang::ssaf::AnalysisBase.

Definition at line 91 of file SummaryAnalysis.h.

References clang::Empty.

◆ finalize()

template<typename ResultT, typename EntitySummaryT>
virtual llvm::Error clang::ssaf::SummaryAnalysis< ResultT, EntitySummaryT >::finalize ( )
inlineoverridevirtual

Called after all entities have been processed.

Override for post-processing.

Reimplemented from clang::ssaf::SummaryAnalysisBase.

Definition at line 104 of file SummaryAnalysis.h.

◆ initialize()

template<typename ResultT, typename EntitySummaryT>
virtual llvm::Error clang::ssaf::SummaryAnalysis< ResultT, EntitySummaryT >::initialize ( )
inlineoverridevirtual

Called once before the first add() call. Override for initialization.

Reimplemented from clang::ssaf::SummaryAnalysisBase.

Definition at line 97 of file SummaryAnalysis.h.

◆ result() [1/2]

template<typename ResultT, typename EntitySummaryT>
ResultT & clang::ssaf::SummaryAnalysis< ResultT, EntitySummaryT >::result ( ) &
inlineprotected

Mutable access to the result being built.

Definition at line 111 of file SummaryAnalysis.h.

◆ result() [2/2]

template<typename ResultT, typename EntitySummaryT>
const ResultT & clang::ssaf::SummaryAnalysis< ResultT, EntitySummaryT >::result ( ) const &
inlineprotected

Read-only access to the result being built.

Definition at line 108 of file SummaryAnalysis.h.

◆ summaryName()

template<typename ResultT, typename EntitySummaryT>
SummaryName clang::ssaf::SummaryAnalysis< ResultT, EntitySummaryT >::summaryName ( ) const
inlinefinalvirtual

SummaryName of the EntitySummary type this analysis consumes.

Used by the driver to route entities from the LUSummary.

Implements clang::ssaf::SummaryAnalysisBase.

Definition at line 87 of file SummaryAnalysis.h.

◆ AnalysisRegistry

template<typename ResultT, typename EntitySummaryT>
friend class AnalysisRegistry
friend

Definition at line 78 of file SummaryAnalysis.h.

References AnalysisRegistry.

Referenced by AnalysisRegistry.


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