clang 23.0.0git
EntitySummaryEncoding.h
Go to the documentation of this file.
1//===- EntitySummaryEncoding.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 EntitySummaryEncoding class, which represents
10// EntitySummary data in an encoded, format-specific form.
11//
12//===----------------------------------------------------------------------===//
13
14#ifndef LLVM_CLANG_ANALYSIS_SCALABLE_ENTITYLINKER_ENTITYSUMMARYENCODING_H
15#define LLVM_CLANG_ANALYSIS_SCALABLE_ENTITYLINKER_ENTITYSUMMARYENCODING_H
16
18#include <map>
19
20namespace clang::ssaf {
21
22/// Represents EntitySummary data in its serialized, format-specific encoding.
23///
24/// This abstract base class allows the entity linker to manipulate serialized
25/// entity summary data without knowing the exact schema of the EntitySummary
26/// subclass. The primary operation is patching EntityId references when
27/// entities are merged during linking.
29public:
30 virtual ~EntitySummaryEncoding() = default;
31
32 /// Updates EntityId references in the encoded data.
33 ///
34 /// \param EntityResolutionTable Mapping from old EntityIds to new EntityIds.
35 virtual void
36 patch(const std::map<EntityId, EntityId> &EntityResolutionTable) = 0;
37};
38
39} // namespace clang::ssaf
40
41#endif // LLVM_CLANG_ANALYSIS_SCALABLE_ENTITYLINKER_ENTITYSUMMARYENCODING_H
Represents EntitySummary data in its serialized, format-specific encoding.
virtual ~EntitySummaryEncoding()=default
virtual void patch(const std::map< EntityId, EntityId > &EntityResolutionTable)=0
Updates EntityId references in the encoded data.