summaryrefslogtreecommitdiff
path: root/lib/CodeGen/SelectionDAG/SelectionDAGPrinter.cpp
diff options
context:
space:
mode:
authorDan Gohman <gohman@apple.com>2008-07-14 17:51:24 +0000
committerDan Gohman <gohman@apple.com>2008-07-14 17:51:24 +0000
commit91d49f5ba1374df9db98b6ee45402ddaa84d08b0 (patch)
treedb56d70ec2aecc219ab3b3e558b4851a0bb1943b /lib/CodeGen/SelectionDAG/SelectionDAGPrinter.cpp
parent2b062994a62a5e1db930e52f46e734f3d8c87a29 (diff)
downloadllvm-91d49f5ba1374df9db98b6ee45402ddaa84d08b0.tar.gz
llvm-91d49f5ba1374df9db98b6ee45402ddaa84d08b0.tar.bz2
llvm-91d49f5ba1374df9db98b6ee45402ddaa84d08b0.tar.xz
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
Diffstat (limited to 'lib/CodeGen/SelectionDAG/SelectionDAGPrinter.cpp')
-rw-r--r--lib/CodeGen/SelectionDAG/SelectionDAGPrinter.cpp11
1 files changed, 7 insertions, 4 deletions
diff --git a/lib/CodeGen/SelectionDAG/SelectionDAGPrinter.cpp b/lib/CodeGen/SelectionDAG/SelectionDAGPrinter.cpp
index db119a6495..cdfdf6f9a2 100644
--- a/lib/CodeGen/SelectionDAG/SelectionDAGPrinter.cpp
+++ b/lib/CodeGen/SelectionDAG/SelectionDAGPrinter.cpp
@@ -155,10 +155,13 @@ std::string DOTGraphTraits<SelectionDAG*>::getNodeLabel(const SDNode *Node,
else
Op += "<null>";
} else if (const MemOperandSDNode *M = dyn_cast<MemOperandSDNode>(Node)) {
- if (M->MO.getValue())
- Op += "<" + M->MO.getValue()->getName() + ":" + itostr(M->MO.getOffset()) + ">";
- else
- Op += "<null:" + itostr(M->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<ARG_FLAGSSDNode>(Node)) {
Op = Op + " AF=" + N->getArgFlags().getArgFlagsString();
} else if (const VTSDNode *N = dyn_cast<VTSDNode>(Node)) {