clang 23.0.0git
MovedLoans.h
Go to the documentation of this file.
1//===- MovedLoans.h - Moved Loans Analysis -----------*- 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 MovedLoansAnalysis, a forward dataflow analysis that
10// tracks which loans have been moved out of their original storage location
11// at each program point.
12//
13//===----------------------------------------------------------------------===//
14#ifndef LLVM_CLANG_ANALYSIS_ANALYSES_LIFETIMESAFETY_MOVED_LOANS_H
15#define LLVM_CLANG_ANALYSIS_ANALYSES_LIFETIMESAFETY_MOVED_LOANS_H
16
21#include "clang/Analysis/CFG.h"
22
24
25// Map from a loan to an expression responsible for moving the borrowed storage.
26using MovedLoansMap = llvm::ImmutableMap<LoanID, const Expr *>;
27
29public:
31 const LoanPropagationAnalysis &LoanPropagation,
32 const LiveOriginsAnalysis &LiveOrigins,
33 const LoanManager &LoanMgr,
34 MovedLoansMap::Factory &MovedLoansMapFactory);
36
38
39private:
40 class Impl;
41 std::unique_ptr<Impl> PImpl;
42};
43
44} // namespace clang::lifetimes::internal
45
46#endif // LLVM_CLANG_ANALYSIS_ANALYSES_LIFETIMESAFETY_MOVED_LOANS_H
This file defines AnalysisDeclContext, a class that manages the analysis context data for context sen...
AnalysisDeclContext contains the context data for the function, method or block under analysis.
Represents a source-level, intra-procedural CFG that represents the control-flow of a Stmt.
Definition CFG.h:1250
Manages the creation, storage and retrieval of loans.
Definition Loans.h:147
MovedLoansAnalysis(const CFG &C, AnalysisDeclContext &AC, FactManager &F, const LoanPropagationAnalysis &LoanPropagation, const LiveOriginsAnalysis &LiveOrigins, const LoanManager &LoanMgr, MovedLoansMap::Factory &MovedLoansMapFactory)
MovedLoansMap getMovedLoans(ProgramPoint P) const
const Fact * ProgramPoint
A ProgramPoint identifies a location in the CFG by pointing to a specific Fact.
Definition Facts.h:87
llvm::ImmutableMap< LoanID, const Expr * > MovedLoansMap
Definition MovedLoans.h:26