clang 23.0.0git
LUSummaryEncoding.h
Go to the documentation of this file.
1//===- LUSummaryEncoding.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 LUSummaryEncoding class, which represents a link unit
10// summary in its serialized, format-specific encoding.
11//
12//===----------------------------------------------------------------------===//
13
14#ifndef LLVM_CLANG_ANALYSIS_SCALABLE_ENTITYLINKER_LUSUMMARYENCODING_H
15#define LLVM_CLANG_ANALYSIS_SCALABLE_ENTITYLINKER_LUSUMMARYENCODING_H
16
23#include <map>
24#include <memory>
25
26namespace clang::ssaf {
27
28/// Represents a link unit summary in its serialized encoding.
29///
30/// LUSummaryEncoding holds the combined entity summary data from multiple
31/// translation units in a format-specific encoding. It is produced by the
32/// entity linker and contains deduplicated and patched entity summaries.
34 friend class EntityLinker;
35 friend class SerializationFormat;
36 friend class TestFixture;
37
38 // The namespace identifying this link unit.
39 NestedBuildNamespace LUNamespace;
40
41 // Maps entity names to their unique identifiers within this link unit.
42 EntityIdTable IdTable;
43
44 // Maps entity IDs to their linkage properties.
45 std::map<EntityId, EntityLinkage> LinkageTable;
46
47 // Encoded summary data organized by summary type and entity ID.
48 std::map<SummaryName,
49 std::map<EntityId, std::unique_ptr<EntitySummaryEncoding>>>
50 Data;
51
52public:
54 : LUNamespace(std::move(LUNamespace)) {}
55};
56
57} // namespace clang::ssaf
58
59#endif // LLVM_CLANG_ANALYSIS_SCALABLE_ENTITYLINKER_LUSUMMARYENCODING_H
Manages entity name interning and provides efficient EntityId handles.
LUSummaryEncoding(NestedBuildNamespace LUNamespace)
Represents a hierarchical sequence of build namespaces.
Uniquely identifies an analysis summary.
Definition SummaryName.h:22