clang
23.0.0git
include
clang
Analysis
Scalable
EntityLinker
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
17
#include "
clang/Analysis/Scalable/EntityLinker/EntitySummaryEncoding.h
"
18
#include "
clang/Analysis/Scalable/Model/BuildNamespace.h
"
19
#include "
clang/Analysis/Scalable/Model/EntityId.h
"
20
#include "
clang/Analysis/Scalable/Model/EntityIdTable.h
"
21
#include "
clang/Analysis/Scalable/Model/EntityLinkage.h
"
22
#include "
clang/Analysis/Scalable/Model/SummaryName.h
"
23
#include <map>
24
#include <memory>
25
26
namespace
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.
33
class
LUSummaryEncoding
{
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
52
public
:
53
explicit
LUSummaryEncoding
(
NestedBuildNamespace
LUNamespace)
54
: LUNamespace(
std
::move(LUNamespace)) {}
55
};
56
57
}
// namespace clang::ssaf
58
59
#endif
// LLVM_CLANG_ANALYSIS_SCALABLE_ENTITYLINKER_LUSUMMARYENCODING_H
BuildNamespace.h
EntityIdTable.h
EntityId.h
EntityLinkage.h
EntitySummaryEncoding.h
SummaryName.h
clang::ssaf::EntityIdTable
Manages entity name interning and provides efficient EntityId handles.
Definition
EntityIdTable.h:23
clang::ssaf::LUSummaryEncoding::EntityLinker
friend class EntityLinker
Definition
LUSummaryEncoding.h:34
clang::ssaf::LUSummaryEncoding::LUSummaryEncoding
LUSummaryEncoding(NestedBuildNamespace LUNamespace)
Definition
LUSummaryEncoding.h:53
clang::ssaf::LUSummaryEncoding::SerializationFormat
friend class SerializationFormat
Definition
LUSummaryEncoding.h:35
clang::ssaf::LUSummaryEncoding::TestFixture
friend class TestFixture
Definition
LUSummaryEncoding.h:36
clang::ssaf::NestedBuildNamespace
Represents a hierarchical sequence of build namespaces.
Definition
BuildNamespace.h:82
clang::ssaf::SummaryName
Uniquely identifies an analysis summary.
Definition
SummaryName.h:22
clang::ssaf
Definition
UnsafeBufferUsage.h:18
std
Definition
__clang_cuda_cmath.h:361
Generated on
for clang by
1.14.0