clang
23.0.0git
include
clang
ScalableStaticAnalysisFramework
Analyses
PointerFlow
PointerFlowAnalysis.h
Go to the documentation of this file.
1
//===- PointerFlowAnalysis.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
// Defines PointerFlowAnalysisResult — the whole-program pointer-flow graph
10
// aggregated from per-translation-unit EdgeSet summaries.
11
//
12
//===----------------------------------------------------------------------===//
13
14
#ifndef LLVM_CLANG_SCALABLESTATICANALYSISFRAMEWORK_ANALYSES_POINTERFLOW_POINTERFLOWANALYSIS_H
15
#define LLVM_CLANG_SCALABLESTATICANALYSISFRAMEWORK_ANALYSES_POINTERFLOW_POINTERFLOWANALYSIS_H
16
17
#include "
clang/ScalableStaticAnalysisFramework/Analyses/PointerFlow/PointerFlow.h
"
18
#include "
clang/ScalableStaticAnalysisFramework/Core/Model/EntityId.h
"
19
#include "
clang/ScalableStaticAnalysisFramework/Core/WholeProgramAnalysis/AnalysisName.h
"
20
#include "
clang/ScalableStaticAnalysisFramework/Core/WholeProgramAnalysis/AnalysisResult.h
"
21
#include "llvm/ADT/StringRef.h"
22
#include <map>
23
24
namespace
clang::ssaf
{
25
26
constexpr
llvm::StringLiteral
PointerFlowAnalysisResultName
=
27
"PointerFlowAnalysisResult"
;
28
29
/// The whole-program pointer-flow graph. Each directed edge 'src -> dest'
30
/// records a static assignment site where 'src' (the LHS / assignee) is
31
/// assigned the value of 'dest' (the RHS / assigned value).
32
///
33
/// This edge direction matches property-propagation direction: if a property
34
/// (such as a bounds requirement) holds for 'src', it must also hold for
35
/// 'dest', because 'dest' supplies the value that 'src' will hold.
36
struct
PointerFlowAnalysisResult
final :
AnalysisResult
{
37
static
AnalysisName
analysisName
() {
38
return
AnalysisName
(
PointerFlowAnalysisResultName
.str());
39
}
40
41
std::map<EntityId, EdgeSet>
Edges
;
42
};
43
44
}
// namespace clang::ssaf
45
46
#endif
// LLVM_CLANG_SCALABLESTATICANALYSISFRAMEWORK_ANALYSES_POINTERFLOW_POINTERFLOWANALYSIS_H
AnalysisName.h
AnalysisResult.h
EntityId.h
PointerFlow.h
clang::ssaf::AnalysisName
Uniquely identifies a whole-program analysis and the AnalysisResult it produces.
Definition
AnalysisName.h:28
clang::ssaf::AnalysisResult
Base class for whole-program analysis results.
Definition
AnalysisResult.h:23
clang::ssaf
Definition
CallGraphSummary.h:17
clang::ssaf::PointerFlowAnalysisResultName
constexpr llvm::StringLiteral PointerFlowAnalysisResultName
Definition
PointerFlowAnalysis.h:26
clang::ssaf::PointerFlowAnalysisResult
The whole-program pointer-flow graph.
Definition
PointerFlowAnalysis.h:36
clang::ssaf::PointerFlowAnalysisResult::Edges
std::map< EntityId, EdgeSet > Edges
Definition
PointerFlowAnalysis.h:41
clang::ssaf::PointerFlowAnalysisResult::analysisName
static AnalysisName analysisName()
Definition
PointerFlowAnalysis.h:37
Generated on
for clang by
1.14.0