9#ifndef LLVM_CLANG_SCALABLESTATICANALYSISFRAMEWORK_CORE_TUSUMMARY_TUSUMMARYBUILDER_H
10#define LLVM_CLANG_SCALABLESTATICANALYSISFRAMEWORK_CORE_TUSUMMARY_TUSUMMARYBUILDER_H
33 template <
typename ConcreteEntitySummary,
35 std::pair<EntitySummary *, bool>
41 std::pair<EntitySummary *, bool>
42 addSummaryImpl(
EntityId Entity, std::unique_ptr<EntitySummary> &&
Data);
52template <
typename ConcreteEntitySummary,
54std::pair<EntitySummary *, bool>
56 std::unique_ptr<ConcreteEntitySummary> &&
Data) {
59 std::unique_ptr<EntitySummary> TypeErasedData = std::move(
Data);
63 auto [It, Inserted] = addSummaryImpl(Entity, std::move(TypeErasedData));
67 Data = std::unique_ptr<ConcreteEntitySummary>(
68 static_cast<ConcreteEntitySummary *
>(TypeErasedData.release()));
70 return {It, Inserted};
Lightweight opaque handle representing an entity in an EntityIdTable.
Uniquely identifies an entity in a program.
std::pair< EntitySummary *, bool > addSummary(EntityId Entity, std::unique_ptr< ConcreteEntitySummary > &&Data)
Associate the Data EntitySummary with the Entity.
EntityId addEntity(const EntityName &EN, EntityLinkageType Linkage)
TUSummaryBuilder(TUSummary &Summary)
Data extracted for a given translation unit and for a given set of analyses.
std::enable_if_t< std::is_base_of_v< EntitySummary, Derived > > DerivesFromEntitySummary
Linkage
Describes the different kinds of linkage (C++ [basic.link], C99 6.2.2) that an entity may have.