clang 24.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
22#include "clang/Analysis/CFG.h"
23
25
26// Map from a loan to an expression responsible for moving the borrowed storage.
28
30public:
32 const LoanPropagationAnalysis &LoanPropagation,
33 const LiveOriginsAnalysis &LiveOrigins,
34 const LoanManager &LoanMgr,
35 MovedLoansMap::Factory &MovedLoansMapFactory);
37
39
40private:
41 class Impl;
42 std::unique_ptr<Impl> PImpl;
43};
44
45} // namespace clang::lifetimes::internal
46
47#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:1271
Manages the creation, storage and retrieval of loans.
Definition Loans.h:210
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
llvm::ImmutableMap< KeyT, ValT, llvm::ImutKeyValueInfo< KeyT, ValT >, false > MapTy
Definition Utils.h:44
const Fact * ProgramPoint
A ProgramPoint identifies a location in the CFG by pointing to a specific Fact.
Definition Facts.h:95
utils::MapTy< LoanID, const Expr * > MovedLoansMap
Definition MovedLoans.h:27