summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--llvm/include/llvm/Analysis/CallGraph.h2
-rw-r--r--llvm/lib/Analysis/IPA/CallGraph.cpp3
2 files changed, 4 insertions, 1 deletions
diff --git a/llvm/include/llvm/Analysis/CallGraph.h b/llvm/include/llvm/Analysis/CallGraph.h
index c36cb22780e..f405f63f96d 100644
--- a/llvm/include/llvm/Analysis/CallGraph.h
+++ b/llvm/include/llvm/Analysis/CallGraph.h
@@ -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();
diff --git a/llvm/lib/Analysis/IPA/CallGraph.cpp b/llvm/lib/Analysis/IPA/CallGraph.cpp
index f03e4b2ba24..453f4c2fb3e 100644
--- a/llvm/lib/Analysis/IPA/CallGraph.cpp
+++ b/llvm/lib/Analysis/IPA/CallGraph.cpp
@@ -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
OpenPOWER on IntegriCloud