clang 23.0.0git
clang::ssaf::SummaryDataStore Class Reference

Owns a collection of SummaryData objects keyed by SummaryName. More...

#include "clang/ScalableStaticAnalysisFramework/Core/SummaryData/SummaryDataStore.h"

Public Member Functions

bool contains (const SummaryName &Name) const
 Returns true if data for Name is stored.
template<typename DataT>
bool contains () const
 Returns true if data for DataT is stored.
template<typename DataT>
llvm::Expected< DataT & > get ()
 Returns a reference to the data for DataT, or an error if no data for DataT is stored.
llvm::Expected< SummaryData & > get (const SummaryName &Name)
 Returns a reference to the data for Name, or an error if no data for Name is stored.
template<typename DataT>
llvm::Expected< std::unique_ptr< DataT > > take ()
 Transfers ownership of the data for DataT to the caller, or returns an error if no data for DataT is stored.
llvm::Expected< std::unique_ptr< SummaryData > > take (const SummaryName &Name)
 Transfers ownership of the data for Name to the caller, or returns an error if no data for Name is stored.

Friends

class LUSummaryConsumer

Detailed Description

Owns a collection of SummaryData objects keyed by SummaryName.

Produced by LUSummaryConsumer::run() variants.

Definition at line 31 of file SummaryDataStore.h.

Member Function Documentation

◆ contains() [1/2]

template<typename DataT>
bool clang::ssaf::SummaryDataStore::contains ( ) const
inlinenodiscard

Returns true if data for DataT is stored.

Definition at line 43 of file SummaryDataStore.h.

References contains().

Referenced by contains().

◆ contains() [2/2]

bool clang::ssaf::SummaryDataStore::contains ( const SummaryName & Name) const
inlinenodiscard

Returns true if data for Name is stored.

Definition at line 38 of file SummaryDataStore.h.

◆ get() [1/2]

template<typename DataT>
llvm::Expected< DataT & > clang::ssaf::SummaryDataStore::get ( )
inlinenodiscard

Returns a reference to the data for DataT, or an error if no data for DataT is stored.

Definition at line 54 of file SummaryDataStore.h.

References get(), and clang::Result.

Referenced by get().

◆ get() [2/2]

llvm::Expected< SummaryData & > clang::ssaf::SummaryDataStore::get ( const SummaryName & Name)
inlinenodiscard

Returns a reference to the data for Name, or an error if no data for Name is stored.

Definition at line 69 of file SummaryDataStore.h.

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

◆ take() [1/2]

template<typename DataT>
llvm::Expected< std::unique_ptr< DataT > > clang::ssaf::SummaryDataStore::take ( )
inlinenodiscard

Transfers ownership of the data for DataT to the caller, or returns an error if no data for DataT is stored.

Definition at line 83 of file SummaryDataStore.h.

References clang::Result, and take().

Referenced by take().

◆ take() [2/2]

llvm::Expected< std::unique_ptr< SummaryData > > clang::ssaf::SummaryDataStore::take ( const SummaryName & Name)
inlinenodiscard

Transfers ownership of the data for Name to the caller, or returns an error if no data for Name is stored.

Definition at line 99 of file SummaryDataStore.h.

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

◆ LUSummaryConsumer

friend class LUSummaryConsumer
friend

Definition at line 32 of file SummaryDataStore.h.

References LUSummaryConsumer.

Referenced by LUSummaryConsumer.


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