From: Dan Gohman Date: Mon, 14 Jul 2008 17:51:24 +0000 (+0000) Subject: Improve debug output for MemOperandSDNode. PseudoSourceValue nodes X-Git-Url: http://plrg.eecs.uci.edu/git/?a=commitdiff_plain;h=91d49f5ba1374df9db98b6ee45402ddaa84d08b0;p=oota-llvm.git Improve debug output for MemOperandSDNode. PseudoSourceValue nodes don't have value names, so use print instead of getName() to get a useful string. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@53563 91177308-0d34-0410-b5e6-96231b3b80d8 --- diff --git a/lib/CodeGen/SelectionDAG/SelectionDAGPrinter.cpp b/lib/CodeGen/SelectionDAG/SelectionDAGPrinter.cpp index db119a64954..cdfdf6f9a22 100644 --- a/lib/CodeGen/SelectionDAG/SelectionDAGPrinter.cpp +++ b/lib/CodeGen/SelectionDAG/SelectionDAGPrinter.cpp @@ -155,10 +155,13 @@ std::string DOTGraphTraits::getNodeLabel(const SDNode *Node, else Op += ""; } else if (const MemOperandSDNode *M = dyn_cast(Node)) { - if (M->MO.getValue()) - Op += "<" + M->MO.getValue()->getName() + ":" + itostr(M->MO.getOffset()) + ">"; - else - Op += "MO.getOffset()) + ">"; + if (M->MO.getValue()) { + std::ostringstream SS; + M->MO.getValue()->print(SS); + Op += "<" + SS.str() + "+" + itostr(M->MO.getOffset()) + ">"; + } else { + Op += "<(unknown)+" + itostr(M->MO.getOffset()) + ">"; + } } else if (const ARG_FLAGSSDNode *N = dyn_cast(Node)) { Op = Op + " AF=" + N->getArgFlags().getArgFlagsString(); } else if (const VTSDNode *N = dyn_cast(Node)) {