From 962ee45fe6c57cb59c50a8c61f5c03232e42d726 Mon Sep 17 00:00:00 2001 From: Chris Lattner Date: Wed, 16 Oct 2002 20:16:16 +0000 Subject: [PATCH] Make sure to print out the call nodes as well git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@4203 91177308-0d34-0410-b5e6-96231b3b80d8 --- lib/Analysis/DataStructure/Printer.cpp | 15 ++++++++++++++- 1 file changed, 14 insertions(+), 1 deletion(-) diff --git a/lib/Analysis/DataStructure/Printer.cpp b/lib/Analysis/DataStructure/Printer.cpp index 4235fefdce0..614cb1fd0e4 100644 --- a/lib/Analysis/DataStructure/Printer.cpp +++ b/lib/Analysis/DataStructure/Printer.cpp @@ -210,11 +210,24 @@ struct DOTGraphTraits : public DefaultDOTGraphTraits { GW.emitEdge((void*)1, -1, G->getRetNode().getNode(), RetEdgeDest, "arrowtail=tee,color=gray63"); } + + // Output all of the call nodes... + const std::vector > &FCs = G->getFunctionCalls(); + for (unsigned i = 0, e = FCs.size(); i != e; ++i) { + const std::vector &Call = FCs[i]; + GW.emitSimpleNode(&Call, "shape=record", "call", Call.size()); + + for (unsigned j = 0, e = Call.size(); j != e; ++j) + if (Call[j].getNode()) { + int EdgeDest = Call[j].getOffset(); + if (EdgeDest == 0) EdgeDest = -1; + GW.emitEdge(&Call, j, Call[j].getNode(), EdgeDest, "color=gray63"); + } + } } }; - void DSGraph::writeGraphToFile(std::ostream &O, const string &GraphName) { string Filename = GraphName + ".dot"; O << "Writing '" << Filename << "'...";