clang 23.0.0git
CallGraphSummary.h
Go to the documentation of this file.
1//===- CallGraphSummary.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_ANALYSES_CALLGRAPH_CALLGRAPHSUMMARY_H
10#define LLVM_CLANG_SCALABLESTATICANALYSISFRAMEWORK_ANALYSES_CALLGRAPH_CALLGRAPHSUMMARY_H
11
15#include <set>
16
17namespace clang::ssaf {
18
19/// Summary of direct call-graph edges for a single function entity.
20///
21/// Represents a function definition, and information about its callees.
22///
23/// \bug Indirect calls (e.g. function pointers) are not represented.
24/// \bug ObjCMessageExprs are not represented.
25/// \bug Primary template functions are not represented.
26struct CallGraphSummary final : public EntitySummary {
27 struct Location {
28 std::string File;
29 unsigned Line;
30 unsigned Column;
31 };
32
33 SummaryName getSummaryName() const override {
34 return SummaryName("CallGraph");
35 }
36
37 /// Represents the location of the function.
39
40 /// The set of direct callees of this function.
41 std::set<EntityId> DirectCallees;
42
43 /// The set of virtual callees of this function.
44 std::set<EntityId> VirtualCallees;
45
46 /// A human-readable name of the function.
47 /// This is not guaranteed to be accurate or unique.
48 std::string PrettyName;
49};
50
51} // namespace clang::ssaf
52
53#endif // LLVM_CLANG_SCALABLESTATICANALYSISFRAMEWORK_ANALYSES_CALLGRAPH_CALLGRAPHSUMMARY_H
Base class for analysis-specific summary data.
Uniquely identifies an analysis summary.
Definition SummaryName.h:22
Summary of direct call-graph edges for a single function entity.
Location Definition
Represents the location of the function.
std::set< EntityId > DirectCallees
The set of direct callees of this function.
std::string PrettyName
A human-readable name of the function.
SummaryName getSummaryName() const override
std::set< EntityId > VirtualCallees
The set of virtual callees of this function.