diff --git a/include/llvm/Analysis/CallPrinter.h b/include/llvm/Analysis/CallPrinter.h index 5f5d160c3ca..8b697d5aa14 100644 --- a/include/llvm/Analysis/CallPrinter.h +++ b/include/llvm/Analysis/CallPrinter.h @@ -17,10 +17,10 @@ namespace llvm { - class ModulePass; +class ModulePass; - ModulePass *createCallGraphViewerPass(); - ModulePass *createCallGraphPrinterPass(); +ModulePass *createCallGraphViewerPass(); +ModulePass *createCallGraphDOTPrinterPass(); } // end namespace llvm diff --git a/include/llvm/InitializePasses.h b/include/llvm/InitializePasses.h index 96cf31e0a4a..9c3a576aab5 100644 --- a/include/llvm/InitializePasses.h +++ b/include/llvm/InitializePasses.h @@ -81,7 +81,7 @@ void initializeBoundsCheckingPass(PassRegistry&); void initializeBranchFolderPassPass(PassRegistry&); void initializeBranchProbabilityInfoWrapperPassPass(PassRegistry&); void initializeBreakCriticalEdgesPass(PassRegistry&); -void initializeCallGraphPrinterPass(PassRegistry&); +void initializeCallGraphDOTPrinterPass(PassRegistry&); void initializeCallGraphViewerPass(PassRegistry&); void initializeCFGOnlyPrinterPass(PassRegistry&); void initializeCFGOnlyViewerPass(PassRegistry&); diff --git a/include/llvm/LinkAllPasses.h b/include/llvm/LinkAllPasses.h index 8c777547a40..84f1869d60e 100644 --- a/include/llvm/LinkAllPasses.h +++ b/include/llvm/LinkAllPasses.h @@ -69,7 +69,7 @@ namespace { (void) llvm::createScopedNoAliasAAWrapperPass(); (void) llvm::createBoundsCheckingPass(); (void) llvm::createBreakCriticalEdgesPass(); - (void) llvm::createCallGraphPrinterPass(); + (void) llvm::createCallGraphDOTPrinterPass(); (void) llvm::createCallGraphViewerPass(); (void) llvm::createCFGSimplificationPass(); (void) llvm::createCFLAAWrapperPass(); diff --git a/lib/Analysis/Analysis.cpp b/lib/Analysis/Analysis.cpp index cf13dad315a..4048146515f 100644 --- a/lib/Analysis/Analysis.cpp +++ b/lib/Analysis/Analysis.cpp @@ -26,7 +26,7 @@ void llvm::initializeAnalysis(PassRegistry &Registry) { initializeBlockFrequencyInfoWrapperPassPass(Registry); initializeBranchProbabilityInfoWrapperPassPass(Registry); initializeCallGraphWrapperPassPass(Registry); - initializeCallGraphPrinterPass(Registry); + initializeCallGraphDOTPrinterPass(Registry); initializeCallGraphViewerPass(Registry); initializeCostModelAnalysisPass(Registry); initializeCFGViewerPass(Registry); diff --git a/lib/Analysis/CallPrinter.cpp b/lib/Analysis/CallPrinter.cpp index 68dcd3c0642..af942e9ed3e 100644 --- a/lib/Analysis/CallPrinter.cpp +++ b/lib/Analysis/CallPrinter.cpp @@ -58,16 +58,16 @@ struct CallGraphViewer } }; -struct CallGraphPrinter : public DOTGraphTraitsModulePrinter< +struct CallGraphDOTPrinter : public DOTGraphTraitsModulePrinter< CallGraphWrapperPass, true, CallGraph *, AnalysisCallGraphWrapperPassTraits> { static char ID; - CallGraphPrinter() + CallGraphDOTPrinter() : DOTGraphTraitsModulePrinter( "callgraph", ID) { - initializeCallGraphPrinterPass(*PassRegistry::getPassRegistry()); + initializeCallGraphDOTPrinterPass(*PassRegistry::getPassRegistry()); } }; @@ -77,8 +77,8 @@ char CallGraphViewer::ID = 0; INITIALIZE_PASS(CallGraphViewer, "view-callgraph", "View call graph", false, false) -char CallGraphPrinter::ID = 0; -INITIALIZE_PASS(CallGraphPrinter, "dot-callgraph", +char CallGraphDOTPrinter::ID = 0; +INITIALIZE_PASS(CallGraphDOTPrinter, "dot-callgraph", "Print call graph to 'dot' file", false, false) // Create methods available outside of this file, to use them @@ -87,6 +87,6 @@ INITIALIZE_PASS(CallGraphPrinter, "dot-callgraph", ModulePass *llvm::createCallGraphViewerPass() { return new CallGraphViewer(); } -ModulePass *llvm::createCallGraphPrinterPass() { - return new CallGraphPrinter(); +ModulePass *llvm::createCallGraphDOTPrinterPass() { + return new CallGraphDOTPrinter(); }