add a dump method to CallGraph
authorChris Lattner <sabre@nondot.org>
Sat, 14 Jan 2006 19:17:02 +0000 (19:17 +0000)
committerChris Lattner <sabre@nondot.org>
Sat, 14 Jan 2006 19:17:02 +0000 (19:17 +0000)
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@25314 91177308-0d34-0410-b5e6-96231b3b80d8

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

index 4edb60235624efffb5fcf71e5f71c802572cd98e..e477be34f8ece49ed2bc9af2d8e72b3debbe2011 100644 (file)
@@ -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:
index 03f73fa8d207ae46c3f1c99535f2a9fb503cc9b3..29b8ed4a7f0fbd3a945cb74f1a57226403615598 100644 (file)
@@ -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
 //