add a dump() method on callgraph.
authorChris Lattner <sabre@nondot.org>
Sun, 30 Aug 2009 22:24:32 +0000 (22:24 +0000)
committerChris Lattner <sabre@nondot.org>
Sun, 30 Aug 2009 22:24:32 +0000 (22:24 +0000)
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@80524 91177308-0d34-0410-b5e6-96231b3b80d8

include/llvm/Analysis/CallGraph.h
lib/Analysis/IPA/CallGraph.cpp

index c36cb22780e295c90a08bce34557fc6fc46fc1a4..f405f63f96d0df04bed40d2428c4538ba78d7bbf 100644 (file)
@@ -156,7 +156,7 @@ public:
   void initialize(Module &M);
 
   void print(raw_ostream &o, Module *) const;
-
+  void dump() const;
 protected:
   // destroy - Release memory for the call graph
   virtual void destroy();
index f03e4b2ba24639fef15aa5139c1a6558b9702b1e..453f4c2fb3ed68f99b051c69b7745c59b35a005d 100644 (file)
@@ -181,6 +181,9 @@ void CallGraph::print(raw_ostream &OS, Module*) const {
   for (CallGraph::const_iterator I = begin(), E = end(); I != E; ++I)
     I->second->print(OS);
 }
+void CallGraph::dump() const {
+  print(errs(), 0);
+}
 
 //===----------------------------------------------------------------------===//
 // Implementations of public modification methods