clang
23.0.0git
include
clang
Analysis
Scalable
EntityLinker
TUSummaryEncoding.h
Go to the documentation of this file.
1
//===- TUSummaryEncoding.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 TUSummaryEncoding class, which represents a
10
// translation unit summary in its serialized, format-specific encoding.
11
//
12
//===----------------------------------------------------------------------===//
13
14
#ifndef LLVM_CLANG_ANALYSIS_SCALABLE_ENTITYLINKER_TUSUMMARYENCODING_H
15
#define LLVM_CLANG_ANALYSIS_SCALABLE_ENTITYLINKER_TUSUMMARYENCODING_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 translation unit summary in its serialized encoding.
29
///
30
/// TUSummaryEncoding holds entity summary data in a format-specific encoding
31
/// that can be manipulated by the entity linker without deserializing the
32
/// full EntitySummary objects. This enables efficient entity ID patching
33
/// during the linking process.
34
class
TUSummaryEncoding
{
35
friend
class
EntityLinker
;
36
friend
class
SerializationFormat
;
37
friend
class
TestFixture
;
38
39
// The namespace identifying this translation unit.
40
BuildNamespace
TUNamespace;
41
42
// Maps entity names to their unique identifiers within this TU.
43
EntityIdTable
IdTable;
44
45
// Maps entity IDs to their linkage properties (None, Internal, External).
46
std::map<EntityId, EntityLinkage> LinkageTable;
47
48
// Encoded summary data organized by summary type and entity ID.
49
std::map<
SummaryName
,
50
std::map<EntityId, std::unique_ptr<EntitySummaryEncoding>>>
51
Data;
52
53
public
:
54
explicit
TUSummaryEncoding
(
BuildNamespace
TUNamespace)
55
: TUNamespace(
std
::move(TUNamespace)) {}
56
};
57
58
}
// namespace clang::ssaf
59
60
#endif
// LLVM_CLANG_ANALYSIS_SCALABLE_ENTITYLINKER_TUSUMMARYENCODING_H
BuildNamespace.h
EntityIdTable.h
EntityId.h
EntityLinkage.h
EntitySummaryEncoding.h
SummaryName.h
clang::ssaf::BuildNamespace
Represents a single namespace in the build process.
Definition
BuildNamespace.h:46
clang::ssaf::EntityIdTable
Manages entity name interning and provides efficient EntityId handles.
Definition
EntityIdTable.h:23
clang::ssaf::SummaryName
Uniquely identifies an analysis summary.
Definition
SummaryName.h:22
clang::ssaf::TUSummaryEncoding::TUSummaryEncoding
TUSummaryEncoding(BuildNamespace TUNamespace)
Definition
TUSummaryEncoding.h:54
clang::ssaf::TUSummaryEncoding::EntityLinker
friend class EntityLinker
Definition
TUSummaryEncoding.h:35
clang::ssaf::TUSummaryEncoding::SerializationFormat
friend class SerializationFormat
Definition
TUSummaryEncoding.h:36
clang::ssaf::TUSummaryEncoding::TestFixture
friend class TestFixture
Definition
TUSummaryEncoding.h:37
clang::ssaf
Definition
UnsafeBufferUsage.h:18
std
Definition
__clang_cuda_cmath.h:361
Generated on
for clang by
1.14.0