clang 23.0.0git
LUSummary.h
Go to the documentation of this file.
1//===- LUSummary.h ----------------------------------------------*- C++ -*-===//
2//
3// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
4// See https://llvm.org/LICENSE.txt for license information.
5// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
6//
7//===----------------------------------------------------------------------===//
8//
9// This file defines the LUSummary class, which represents a link unit summary
10// containing merged and deduplicated entity summaries from multiple TUs.
11//
12//===----------------------------------------------------------------------===//
13
14#ifndef LLVM_CLANG_SCALABLESTATICANALYSISFRAMEWORK_CORE_ENTITYLINKER_LUSUMMARY_H
15#define LLVM_CLANG_SCALABLESTATICANALYSISFRAMEWORK_CORE_ENTITYLINKER_LUSUMMARY_H
16
23#include <map>
24#include <memory>
25
26namespace clang::ssaf {
27
28/// Represents a link unit (LU) summary containing merged entity summaries.
29///
30/// LUSummary is the result of linking multiple translation unit summaries
31/// together. It contains deduplicated entities with their linkage information
32/// and the merged entity summaries.
33class LUSummary {
34 friend class LUSummaryConsumer;
35 friend class SerializationFormat;
36 friend class TestFixture;
37
38 NestedBuildNamespace LUNamespace;
39
40 EntityIdTable IdTable;
41
42 std::map<EntityId, EntityLinkage> LinkageTable;
43
44 std::map<SummaryName, std::map<EntityId, std::unique_ptr<EntitySummary>>>
45 Data;
46
47public:
48 explicit LUSummary(NestedBuildNamespace LUNamespace)
49 : LUNamespace(std::move(LUNamespace)) {}
50};
51
52} // namespace clang::ssaf
53
54#endif // LLVM_CLANG_SCALABLESTATICANALYSISFRAMEWORK_CORE_ENTITYLINKER_LUSUMMARY_H
Manages entity name interning and provides efficient EntityId handles.
LUSummary(NestedBuildNamespace LUNamespace)
Definition LUSummary.h:48
friend class SerializationFormat
Definition LUSummary.h:35
friend class LUSummaryConsumer
Definition LUSummary.h:34
friend class TestFixture
Definition LUSummary.h:36
Represents a hierarchical sequence of build namespaces.