Skip to content

[pass-manager] Missed one. notifyDeleteFunction => notifyWillDeleteFu… #18008

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion include/swift/SILOptimizer/PassManager/PassManager.h
Original file line number Diff line number Diff line change
Expand Up @@ -203,7 +203,7 @@ class SILPassManager {
}

/// \brief Iterate over all analysis and notify them of a deleted function.
void notifyDeleteFunction(SILFunction *F) {
void notifyWillDeleteFunction(SILFunction *F) {
// Invalidate the analysis (unless they are locked)
for (auto AP : Analyses)
if (!AP->isLocked())
Expand Down
6 changes: 3 additions & 3 deletions include/swift/SILOptimizer/PassManager/Transforms.h
Original file line number Diff line number Diff line change
Expand Up @@ -164,9 +164,9 @@ namespace swift {
PM->invalidateFunctionTables();
}

/// Inform the pass manager of a deleted function.
void notifyDeleteFunction(SILFunction *F) {
PM->notifyDeleteFunction(F);
/// Inform the pass manager that we are going to delete a function.
void notifyWillDeleteFunction(SILFunction *F) {
PM->notifyWillDeleteFunction(F);
}

/// Inform the pass manager of an added function.
Expand Down
2 changes: 1 addition & 1 deletion lib/SILOptimizer/IPO/DeadFunctionElimination.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -702,7 +702,7 @@ class DeadFunctionElimination : FunctionLivenessComputation {

DEBUG(llvm::dbgs() << " erase dead function " << F->getName() << "\n");
NumDeadFunc++;
DFEPass->notifyDeleteFunction(F);
DFEPass->notifyWillDeleteFunction(F);
Module->eraseFunction(F);
}
if (changedTables)
Expand Down
2 changes: 1 addition & 1 deletion lib/SILOptimizer/Mandatory/MandatoryInlining.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -673,7 +673,7 @@ class MandatoryInlining : public SILModuleTransform {
if (F.getRepresentation() == SILFunctionTypeRepresentation::ObjCMethod)
continue;

notifyDeleteFunction(&F);
notifyWillDeleteFunction(&F);

// Okay, just erase the function from the module.
M->eraseFunction(&F);
Expand Down