clang
23.0.0git
include
clang
ScalableStaticAnalysis
Core
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_SCALABLESTATICANALYSIS_CORE_ENTITYLINKER_LUSUMMARYENCODING_H
15
#define LLVM_CLANG_SCALABLESTATICANALYSIS_CORE_ENTITYLINKER_LUSUMMARYENCODING_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 link unit summary in its serialized encoding.
30
///
31
/// LUSummaryEncoding holds the combined entity summary data from multiple
32
/// translation units in a format-specific encoding. It is produced by the
33
/// entity linker and contains deduplicated and patched entity summaries.
34
class
LUSummaryEncoding
{
35
friend
class
EntityLinker
;
36
friend
class
SerializationFormat
;
37
friend
class
TestFixture
;
38
39
// Target triple of the link unit.
40
llvm::Triple TargetTriple;
41
42
// The namespace identifying this link unit.
43
NestedBuildNamespace
LUNamespace;
44
45
// Maps entity names to their unique identifiers within this link unit.
46
EntityIdTable
IdTable;
47
48
// Maps entity IDs to their linkage properties.
49
std::map<EntityId, EntityLinkage> LinkageTable;
50
51
// Encoded summary data organized by summary type and entity ID.
52
std::map<
SummaryName
,
53
std::map<EntityId, std::unique_ptr<EntitySummaryEncoding>>>
54
Data;
55
56
public
:
57
LUSummaryEncoding
(llvm::Triple TargetTriple,
NestedBuildNamespace
LUNamespace)
58
: TargetTriple(
std
::move(TargetTriple)),
59
LUNamespace(
std
::move(LUNamespace)) {}
60
};
61
62
}
// namespace clang::ssaf
63
64
#endif
// LLVM_CLANG_SCALABLESTATICANALYSIS_CORE_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::LUSummaryEncoding
LUSummaryEncoding(llvm::Triple TargetTriple, NestedBuildNamespace LUNamespace)
Definition
LUSummaryEncoding.h:57
clang::ssaf::LUSummaryEncoding::EntityLinker
friend class EntityLinker
Definition
LUSummaryEncoding.h:35
clang::ssaf::LUSummaryEncoding::SerializationFormat
friend class SerializationFormat
Definition
LUSummaryEncoding.h:36
clang::ssaf::LUSummaryEncoding::TestFixture
friend class TestFixture
Definition
LUSummaryEncoding.h:37
clang::ssaf::NestedBuildNamespace
Represents a hierarchical sequence of build namespaces.
Definition
BuildNamespace.h:78
clang::ssaf::SummaryName
Uniquely identifies an analysis summary.
Definition
SummaryName.h:22
clang::ssaf
Definition
CompilerInvocation.h:56
std
Definition
__clang_cuda_cmath.h:361
Generated on
for clang by
1.14.0