From 1694ec615f71e25de6d07ffc6fe29deed353c657 Mon Sep 17 00:00:00 2001 From: Chris Lattner Date: Sat, 14 Jan 2006 19:17:02 +0000 Subject: [PATCH] add a dump method to CallGraph git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@25314 91177308-0d34-0410-b5e6-96231b3b80d8 --- include/llvm/Analysis/CallGraph.h | 3 ++- lib/Analysis/IPA/CallGraph.cpp | 4 ++++ 2 files changed, 6 insertions(+), 1 deletion(-) diff --git a/include/llvm/Analysis/CallGraph.h b/include/llvm/Analysis/CallGraph.h index 4edb6023562..e477be34f8e 100644 --- a/include/llvm/Analysis/CallGraph.h +++ b/include/llvm/Analysis/CallGraph.h @@ -147,7 +147,8 @@ public: void initialize(Module &M); virtual void print(std::ostream &o, const Module *M) const; - + void dump() const; + // stub - dummy function, just ignore it static void stub(); protected: diff --git a/lib/Analysis/IPA/CallGraph.cpp b/lib/Analysis/IPA/CallGraph.cpp index 03f73fa8d20..29b8ed4a7f0 100644 --- a/lib/Analysis/IPA/CallGraph.cpp +++ b/lib/Analysis/IPA/CallGraph.cpp @@ -216,6 +216,10 @@ void CallGraph::print(std::ostream &OS, const Module *M) const { I->second->print(OS); } +void CallGraph::dump() const { + print(std::cerr, 0); +} + //===----------------------------------------------------------------------===// // Implementations of public modification methods //