Skip to content

Commit d05bd34

Browse files
committed
[NFC][NewPM/Codegen] Remove unused parameter from verifyMachineFunction
The MachineFunctionAnalysisManager forward declaration is messing with upcoming changes.
1 parent b1ac052 commit d05bd34

File tree

3 files changed

+4
-7
lines changed

3 files changed

+4
-7
lines changed

llvm/include/llvm/CodeGen/MachineFunction.h

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1423,9 +1423,7 @@ template <> struct GraphTraits<Inverse<const MachineFunction*>> :
14231423
}
14241424
};
14251425

1426-
class MachineFunctionAnalysisManager;
1427-
void verifyMachineFunction(MachineFunctionAnalysisManager *,
1428-
const std::string &Banner,
1426+
void verifyMachineFunction(const std::string &Banner,
14291427
const MachineFunction &MF);
14301428

14311429
} // end namespace llvm

llvm/lib/CodeGen/MachinePassManager.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -42,12 +42,12 @@ Error MachineFunctionPassManager::run(Module &M,
4242
// No need to pop this callback later since MIR pipeline is flat which means
4343
// current pipeline is the top-level pipeline. Callbacks are not used after
4444
// current pipeline.
45-
PI.pushBeforeNonSkippedPassCallback([&MFAM](StringRef PassID, Any IR) {
45+
PI.pushBeforeNonSkippedPassCallback([](StringRef PassID, Any IR) {
4646
assert(llvm::any_cast<const MachineFunction *>(&IR));
4747
const MachineFunction *MF = llvm::any_cast<const MachineFunction *>(IR);
4848
assert(MF && "Machine function should be valid for printing");
4949
std::string Banner = std::string("After ") + std::string(PassID);
50-
verifyMachineFunction(&MFAM, Banner, *MF);
50+
verifyMachineFunction(Banner, *MF);
5151
});
5252
}
5353

llvm/lib/CodeGen/MachineVerifier.cpp

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -339,8 +339,7 @@ FunctionPass *llvm::createMachineVerifierPass(const std::string &Banner) {
339339
return new MachineVerifierPass(Banner);
340340
}
341341

342-
void llvm::verifyMachineFunction(MachineFunctionAnalysisManager *,
343-
const std::string &Banner,
342+
void llvm::verifyMachineFunction(const std::string &Banner,
344343
const MachineFunction &MF) {
345344
// TODO: Use MFAM after porting below analyses.
346345
// LiveVariables *LiveVars;

0 commit comments

Comments
 (0)