Skip to content

Commit 2757085

Browse files
authored
[clang][dataflow][NFC] Delete unused function. (#65602)
I'm not sure why we had this originally, but the function seems to have a pretty onerous contract anyway for a function that is externally available, so it seems better not to keep it around.
1 parent 2d670fa commit 2757085

File tree

2 files changed

+0
-31
lines changed

2 files changed

+0
-31
lines changed

clang/include/clang/Analysis/FlowSensitive/TypeErasedDataflowAnalysis.h

Lines changed: 0 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -132,25 +132,6 @@ struct TypeErasedDataflowAnalysisState {
132132
}
133133
};
134134

135-
/// Transfers the state of a basic block by evaluating each of its elements in
136-
/// the context of `Analysis` and the states of its predecessors that are
137-
/// available in `BlockStates`. `PostVisitCFG` (if provided) will be applied to
138-
/// each element in the block, after it is evaluated.
139-
///
140-
/// Requirements:
141-
///
142-
/// All predecessors of `Block` except those with loop back edges must have
143-
/// already been transferred. States in `BlockStates` that are set to
144-
/// `std::nullopt` represent basic blocks that are not evaluated yet.
145-
TypeErasedDataflowAnalysisState transferBlock(
146-
const ControlFlowContext &CFCtx,
147-
llvm::ArrayRef<std::optional<TypeErasedDataflowAnalysisState>> BlockStates,
148-
const CFGBlock &Block, const Environment &InitEnv,
149-
TypeErasedDataflowAnalysis &Analysis,
150-
std::function<void(const CFGElement &,
151-
const TypeErasedDataflowAnalysisState &)>
152-
PostVisitCFG = nullptr);
153-
154135
/// Performs dataflow analysis and returns a mapping from basic block IDs to
155136
/// dataflow analysis states that model the respective basic blocks. Indices of
156137
/// the returned vector correspond to basic block IDs. Returns an error if the

clang/lib/Analysis/FlowSensitive/TypeErasedDataflowAnalysis.cpp

Lines changed: 0 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -495,18 +495,6 @@ transferCFGBlock(const CFGBlock &Block, AnalysisContext &AC,
495495
return State;
496496
}
497497

498-
TypeErasedDataflowAnalysisState transferBlock(
499-
const ControlFlowContext &CFCtx,
500-
llvm::ArrayRef<std::optional<TypeErasedDataflowAnalysisState>> BlockStates,
501-
const CFGBlock &Block, const Environment &InitEnv,
502-
TypeErasedDataflowAnalysis &Analysis,
503-
std::function<void(const CFGElement &,
504-
const TypeErasedDataflowAnalysisState &)>
505-
PostVisitCFG) {
506-
AnalysisContext AC(CFCtx, Analysis, InitEnv, BlockStates);
507-
return transferCFGBlock(Block, AC, PostVisitCFG);
508-
}
509-
510498
llvm::Expected<std::vector<std::optional<TypeErasedDataflowAnalysisState>>>
511499
runTypeErasedDataflowAnalysis(
512500
const ControlFlowContext &CFCtx, TypeErasedDataflowAnalysis &Analysis,

0 commit comments

Comments
 (0)