diff options
author | Chris Lattner <sabre@nondot.org> | 2002-11-07 01:54:44 +0000 |
---|---|---|
committer | Chris Lattner <sabre@nondot.org> | 2002-11-07 01:54:44 +0000 |
commit | 95a80adc23ebeb22188953fd433c74f9b7e88217 (patch) | |
tree | 60215f16e8ede11a7b2cde8babdbeeba42e343c1 /lib/Analysis/DataStructure/Printer.cpp | |
parent | 17e43de579fc56df2c01fc3b7646b139a74397cb (diff) |
When the -only-print-main-ds option is specified, still print out graph size
statistics for skipped functions
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@4587 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/Analysis/DataStructure/Printer.cpp')
-rw-r--r-- | lib/Analysis/DataStructure/Printer.cpp | 11 |
1 files changed, 9 insertions, 2 deletions
diff --git a/lib/Analysis/DataStructure/Printer.cpp b/lib/Analysis/DataStructure/Printer.cpp index e196535c25..f5c1ec49cf 100644 --- a/lib/Analysis/DataStructure/Printer.cpp +++ b/lib/Analysis/DataStructure/Printer.cpp @@ -168,8 +168,15 @@ static void printCollection(const Collection &C, std::ostream &O, } for (Module::const_iterator I = M->begin(), E = M->end(); I != E; ++I) - if (!I->isExternal() && (I->getName() == "main" || !OnlyPrintMain)) - C.getDSGraph((Function&)*I).writeGraphToFile(O, Prefix+I->getName()); + if (!I->isExternal()) { + DSGraph &Gr = C.getDSGraph((Function&)*I); + if (I->getName() == "main" || !OnlyPrintMain) + Gr.writeGraphToFile(O, Prefix+I->getName()); + else { + O << "Skipped Writing '" << Prefix+I->getName() << ".dot'... [" + << Gr.getGraphSize() << "+" << Gr.getFunctionCalls().size() << "]\n"; + } + } } |