From 482b651cf8d6f77caf3a79d47dd1ec468035d891 Mon Sep 17 00:00:00 2001 From: Chris Lattner Date: Mon, 21 Oct 2002 13:47:57 +0000 Subject: [PATCH] Fix a confusing bug that caused return value and callee pointers to not be printed! git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@4248 91177308-0d34-0410-b5e6-96231b3b80d8 --- lib/Analysis/DataStructure/Printer.cpp | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/lib/Analysis/DataStructure/Printer.cpp b/lib/Analysis/DataStructure/Printer.cpp index 8b6e362cbc1..35f491dd5cf 100644 --- a/lib/Analysis/DataStructure/Printer.cpp +++ b/lib/Analysis/DataStructure/Printer.cpp @@ -112,6 +112,16 @@ struct DOTGraphTraits : public DefaultDOTGraphTraits { const DSCallSite &Call = FCs[i]; GW.emitSimpleNode(&Call, "shape=record", "call", Call.getNumPtrArgs()+2); + if (DSNode *N = Call.getRetVal().getNode()) { + int EdgeDest = Call.getRetVal().getOffset(); + if (EdgeDest == 0) EdgeDest = -1; + GW.emitEdge(&Call, 0, N, EdgeDest, "color=gray63"); + } + if (DSNode *N = Call.getCallee().getNode()) { + int EdgeDest = Call.getCallee().getOffset(); + if (EdgeDest == 0) EdgeDest = -1; + GW.emitEdge(&Call, 1, N, EdgeDest, "color=gray63"); + } for (unsigned j = 0, e = Call.getNumPtrArgs(); j != e; ++j) if (DSNode *N = Call.getPtrArg(j).getNode()) { int EdgeDest = Call.getPtrArg(j).getOffset();