diff --git a/llvm/include/llvm/InitializePasses.h b/llvm/include/llvm/InitializePasses.h index 05122ea98d8ca5..0d53a7bf880af3 100644 --- a/llvm/include/llvm/InitializePasses.h +++ b/llvm/include/llvm/InitializePasses.h @@ -76,7 +76,6 @@ void initializeCFIFixupPass(PassRegistry&); void initializeCFIInstrInserterPass(PassRegistry&); void initializeCallBrPreparePass(PassRegistry &); void initializeCallGraphDOTPrinterPass(PassRegistry&); -void initializeCallGraphPrinterLegacyPassPass(PassRegistry&); void initializeCallGraphViewerPass(PassRegistry&); void initializeCallGraphWrapperPassPass(PassRegistry&); void initializeCheckDebugMachineModulePass(PassRegistry &); diff --git a/llvm/lib/Analysis/Analysis.cpp b/llvm/lib/Analysis/Analysis.cpp index 1fa14b005d3760..260b64edc5e2ea 100644 --- a/llvm/lib/Analysis/Analysis.cpp +++ b/llvm/lib/Analysis/Analysis.cpp @@ -23,7 +23,6 @@ void llvm::initializeAnalysis(PassRegistry &Registry) { initializeBranchProbabilityInfoWrapperPassPass(Registry); initializeCallGraphWrapperPassPass(Registry); initializeCallGraphDOTPrinterPass(Registry); - initializeCallGraphPrinterLegacyPassPass(Registry); initializeCallGraphViewerPass(Registry); initializeCFGViewerLegacyPassPass(Registry); initializeCFGPrinterLegacyPassPass(Registry); diff --git a/llvm/lib/Analysis/CallGraph.cpp b/llvm/lib/Analysis/CallGraph.cpp index 58ccf2bd664be0..20efa2b4ff64c0 100644 --- a/llvm/lib/Analysis/CallGraph.cpp +++ b/llvm/lib/Analysis/CallGraph.cpp @@ -382,33 +382,3 @@ void CallGraphWrapperPass::print(raw_ostream &OS, const Module *) const { LLVM_DUMP_METHOD void CallGraphWrapperPass::dump() const { print(dbgs(), nullptr); } #endif - -namespace { - -struct CallGraphPrinterLegacyPass : public ModulePass { - static char ID; // Pass ID, replacement for typeid - - CallGraphPrinterLegacyPass() : ModulePass(ID) { - initializeCallGraphPrinterLegacyPassPass(*PassRegistry::getPassRegistry()); - } - - void getAnalysisUsage(AnalysisUsage &AU) const override { - AU.setPreservesAll(); - AU.addRequiredTransitive(); - } - - bool runOnModule(Module &M) override { - getAnalysis().print(errs(), &M); - return false; - } -}; - -} // end anonymous namespace - -char CallGraphPrinterLegacyPass::ID = 0; - -INITIALIZE_PASS_BEGIN(CallGraphPrinterLegacyPass, "print-callgraph", - "Print a call graph", true, true) -INITIALIZE_PASS_DEPENDENCY(CallGraphWrapperPass) -INITIALIZE_PASS_END(CallGraphPrinterLegacyPass, "print-callgraph", - "Print a call graph", true, true)