clang 23.0.0git
TUSummary.h
Go to the documentation of this file.
1//===- TUSummary.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#ifndef LLVM_CLANG_SCALABLESTATICANALYSISFRAMEWORK_CORE_TUSUMMARY_TUSUMMARY_H
10#define LLVM_CLANG_SCALABLESTATICANALYSISFRAMEWORK_CORE_TUSUMMARY_TUSUMMARY_H
11
18#include "llvm/TargetParser/Triple.h"
19#include <map>
20#include <memory>
21
22namespace clang::ssaf {
23
24/// Data extracted for a given translation unit and for a given set of analyses.
25class TUSummary {
26 /// Target triple of the translation unit.
27 llvm::Triple TargetTriple;
28
29 /// Identifies the translation unit.
30 BuildNamespace TUNamespace;
31
32 EntityIdTable IdTable;
33
34 std::map<EntityId, EntityLinkage> LinkageTable;
35
36 std::map<SummaryName, std::map<EntityId, std::unique_ptr<EntitySummary>>>
37 Data;
38
39public:
40 TUSummary(llvm::Triple TargetTriple, BuildNamespace TUNamespace)
41 : TargetTriple(std::move(TargetTriple)),
42 TUNamespace(std::move(TUNamespace)) {}
43
44 friend class SerializationFormat;
45 friend class TestFixture;
46 friend class TUSummaryBuilder;
47};
48
49} // namespace clang::ssaf
50
51#endif // LLVM_CLANG_SCALABLESTATICANALYSISFRAMEWORK_CORE_TUSUMMARY_TUSUMMARY_H
Represents a single namespace in the build process.
Manages entity name interning and provides efficient EntityId handles.
friend class TUSummaryBuilder
Definition TUSummary.h:46
friend class SerializationFormat
Definition TUSummary.h:44
TUSummary(llvm::Triple TargetTriple, BuildNamespace TUNamespace)
Definition TUSummary.h:40
friend class TestFixture
Definition TUSummary.h:45