[llvm-commits] [llvm] r53563 - /llvm/trunk/lib/CodeGen/SelectionDAG/SelectionDAGPrinter.cpp
Dan Gohman
gohman at apple.com
Mon Jul 14 10:51:25 PDT 2008
Author: djg
Date: Mon Jul 14 12:51:24 2008
New Revision: 53563
URL: http://llvm.org/viewvc/llvm-project?rev=53563&view=rev
Log:
Improve debug output for MemOperandSDNode. PseudoSourceValue nodes
don't have value names, so use print instead of getName() to get a
useful string.
Modified:
llvm/trunk/lib/CodeGen/SelectionDAG/SelectionDAGPrinter.cpp
Modified: llvm/trunk/lib/CodeGen/SelectionDAG/SelectionDAGPrinter.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/CodeGen/SelectionDAG/SelectionDAGPrinter.cpp?rev=53563&r1=53562&r2=53563&view=diff
==============================================================================
--- llvm/trunk/lib/CodeGen/SelectionDAG/SelectionDAGPrinter.cpp (original)
+++ llvm/trunk/lib/CodeGen/SelectionDAG/SelectionDAGPrinter.cpp Mon Jul 14 12:51:24 2008
@@ -155,10 +155,13 @@
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)) {
More information about the llvm-commits
mailing list