clang
23.0.0git
include
clang
ScalableStaticAnalysis
Core
EntityLinker
LUSummary.h
Go to the documentation of this file.
1
//===- LUSummary.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 LUSummary class, which represents a link unit summary
10
// containing merged and deduplicated entity summaries from multiple TUs.
11
//
12
//===----------------------------------------------------------------------===//
13
14
#ifndef LLVM_CLANG_SCALABLESTATICANALYSIS_CORE_ENTITYLINKER_LUSUMMARY_H
15
#define LLVM_CLANG_SCALABLESTATICANALYSIS_CORE_ENTITYLINKER_LUSUMMARY_H
16
17
#include "
clang/ScalableStaticAnalysis/Core/Model/BuildNamespace.h
"
18
#include "
clang/ScalableStaticAnalysis/Core/Model/EntityId.h
"
19
#include "
clang/ScalableStaticAnalysis/Core/Model/EntityIdTable.h
"
20
#include "
clang/ScalableStaticAnalysis/Core/Model/EntityLinkage.h
"
21
#include "
clang/ScalableStaticAnalysis/Core/Model/SummaryName.h
"
22
#include "
clang/ScalableStaticAnalysis/Core/TUSummary/EntitySummary.h
"
23
#include "llvm/TargetParser/Triple.h"
24
#include <map>
25
#include <memory>
26
27
namespace
clang::ssaf
{
28
29
/// Represents a link unit (LU) summary containing merged entity summaries.
30
///
31
/// LUSummary is the result of linking multiple translation unit summaries
32
/// together. It contains deduplicated entities with their linkage information
33
/// and the merged entity summaries.
34
class
LUSummary
{
35
friend
class
AnalysisDriver
;
36
friend
class
LUSummaryConsumer
;
37
friend
class
SerializationFormat
;
38
friend
class
TestFixture
;
39
40
/// Target triple of the link unit.
41
llvm::Triple TargetTriple;
42
43
NestedBuildNamespace
LUNamespace;
44
45
EntityIdTable
IdTable;
46
47
std::map<EntityId, EntityLinkage> LinkageTable;
48
49
std::map<SummaryName, std::map<EntityId, std::unique_ptr<EntitySummary>>>
50
Data;
51
52
public
:
53
LUSummary
(llvm::Triple TargetTriple,
NestedBuildNamespace
LUNamespace)
54
: TargetTriple(
std
::move(TargetTriple)),
55
LUNamespace(
std
::move(LUNamespace)) {}
56
57
const
NestedBuildNamespace
&
getNamespace
()
const
{
return
LUNamespace; }
58
};
59
60
}
// namespace clang::ssaf
61
62
#endif
// LLVM_CLANG_SCALABLESTATICANALYSIS_CORE_ENTITYLINKER_LUSUMMARY_H
BuildNamespace.h
EntityIdTable.h
EntityId.h
EntityLinkage.h
EntitySummary.h
SummaryName.h
clang::ssaf::EntityIdTable
Manages entity name interning and provides efficient EntityId handles.
Definition
EntityIdTable.h:23
clang::ssaf::LUSummary::SerializationFormat
friend class SerializationFormat
Definition
LUSummary.h:37
clang::ssaf::LUSummary::getNamespace
const NestedBuildNamespace & getNamespace() const
Definition
LUSummary.h:57
clang::ssaf::LUSummary::LUSummaryConsumer
friend class LUSummaryConsumer
Definition
LUSummary.h:36
clang::ssaf::LUSummary::TestFixture
friend class TestFixture
Definition
LUSummary.h:38
clang::ssaf::LUSummary::AnalysisDriver
friend class AnalysisDriver
Definition
LUSummary.h:35
clang::ssaf::LUSummary::LUSummary
LUSummary(llvm::Triple TargetTriple, NestedBuildNamespace LUNamespace)
Definition
LUSummary.h:53
clang::ssaf::NestedBuildNamespace
Represents a hierarchical sequence of build namespaces.
Definition
BuildNamespace.h:78
clang::ssaf
Definition
CompilerInvocation.h:56
std
Definition
__clang_cuda_cmath.h:361
Generated on
for clang by
1.14.0