mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2024-08-21 18:29:46 +00:00
Make the print output more useful
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@8517 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
parent
ad9b5f31ea
commit
b31247a840
@ -135,7 +135,7 @@ static void WriteToOutput(const CallGraphNode *CGN, std::ostream &o) {
|
||||
o << "Call graph node for function: '"
|
||||
<< CGN->getFunction()->getName() <<"'\n";
|
||||
else
|
||||
o << "Call graph node null function:\n";
|
||||
o << "Call graph node <<null function: 0x" << CGN << ">>:\n";
|
||||
|
||||
for (unsigned i = 0; i < CGN->size(); ++i)
|
||||
if ((*CGN)[i]->getFunction())
|
||||
@ -146,8 +146,12 @@ static void WriteToOutput(const CallGraphNode *CGN, std::ostream &o) {
|
||||
}
|
||||
|
||||
void CallGraph::print(std::ostream &o, const Module *M) const {
|
||||
o << "CallGraph Root is:\n" << getRoot();
|
||||
|
||||
o << "CallGraph Root is: ";
|
||||
if (getRoot()->getFunction())
|
||||
o << getRoot()->getFunction()->getName() << "\n";
|
||||
else
|
||||
o << "<<null function: 0x" << getRoot() << ">>\n";
|
||||
|
||||
for (CallGraph::const_iterator I = begin(), E = end(); I != E; ++I)
|
||||
WriteToOutput(I->second, o);
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user