clang
23.0.0git
include
clang
ScalableStaticAnalysis
Core
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_SCALABLESTATICANALYSIS_CORE_ENTITYLINKER_TUSUMMARYENCODING_H
15
#define LLVM_CLANG_SCALABLESTATICANALYSIS_CORE_ENTITYLINKER_TUSUMMARYENCODING_H
16
17
#include "
clang/ScalableStaticAnalysis/Core/EntityLinker/EntitySummaryEncoding.h
"
18
#include "
clang/ScalableStaticAnalysis/Core/Model/BuildNamespace.h
"
19
#include "
clang/ScalableStaticAnalysis/Core/Model/EntityId.h
"
20
#include "
clang/ScalableStaticAnalysis/Core/Model/EntityIdTable.h
"
21
#include "
clang/ScalableStaticAnalysis/Core/Model/EntityLinkage.h
"
22
#include "
clang/ScalableStaticAnalysis/Core/Model/SummaryName.h
"
23
#include "llvm/TargetParser/Triple.h"
24
#include <map>
25
#include <memory>
26
27
namespace
clang::ssaf
{
28
29
/// Represents a translation unit summary in its serialized encoding.
30
///
31
/// TUSummaryEncoding holds entity summary data in a format-specific encoding
32
/// that can be manipulated by the entity linker without deserializing the
33
/// full EntitySummary objects. This enables efficient entity ID patching
34
/// during the linking process.
35
class
TUSummaryEncoding
{
36
friend
class
EntityLinker
;
37
friend
class
SerializationFormat
;
38
friend
class
TestFixture
;
39
40
// Target triple of the translation unit.
41
llvm::Triple TargetTriple;
42
43
// The namespace identifying this translation unit.
44
BuildNamespace
TUNamespace;
45
46
// Maps entity names to their unique identifiers within this TU.
47
EntityIdTable
IdTable;
48
49
// Maps entity IDs to their linkage properties (None, Internal, External).
50
std::map<EntityId, EntityLinkage> LinkageTable;
51
52
// Encoded summary data organized by summary type and entity ID.
53
std::map<
SummaryName
,
54
std::map<EntityId, std::unique_ptr<EntitySummaryEncoding>>>
55
Data;
56
57
public
:
58
TUSummaryEncoding
(llvm::Triple TargetTriple,
BuildNamespace
TUNamespace)
59
: TargetTriple(
std
::move(TargetTriple)),
60
TUNamespace(
std
::move(TUNamespace)) {}
61
62
const
llvm::Triple &
getTargetTriple
()
const
{
return
TargetTriple; }
63
};
64
65
}
// namespace clang::ssaf
66
67
#endif
// LLVM_CLANG_SCALABLESTATICANALYSIS_CORE_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:42
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::EntityLinker
friend class EntityLinker
Definition
TUSummaryEncoding.h:36
clang::ssaf::TUSummaryEncoding::getTargetTriple
const llvm::Triple & getTargetTriple() const
Definition
TUSummaryEncoding.h:62
clang::ssaf::TUSummaryEncoding::TUSummaryEncoding
TUSummaryEncoding(llvm::Triple TargetTriple, BuildNamespace TUNamespace)
Definition
TUSummaryEncoding.h:58
clang::ssaf::TUSummaryEncoding::SerializationFormat
friend class SerializationFormat
Definition
TUSummaryEncoding.h:37
clang::ssaf::TUSummaryEncoding::TestFixture
friend class TestFixture
Definition
TUSummaryEncoding.h:38
clang::ssaf
Definition
CompilerInvocation.h:56
std
Definition
__clang_cuda_cmath.h:361
Generated on
for clang by
1.14.0