Print SrcValue nodes correctly
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@21803 91177308-0d34-0410-b5e6-96231b3b80d8
diff --git a/lib/CodeGen/SelectionDAG/SelectionDAGPrinter.cpp b/lib/CodeGen/SelectionDAG/SelectionDAGPrinter.cpp
index 2ed1fe4..8d8e1fd 100644
--- a/lib/CodeGen/SelectionDAG/SelectionDAGPrinter.cpp
+++ b/lib/CodeGen/SelectionDAG/SelectionDAGPrinter.cpp
@@ -90,6 +90,11 @@
Op += "'" + std::string(ES->getSymbol()) + "'";
} else if (const MVTSDNode *M = dyn_cast<MVTSDNode>(Node)) {
Op = Op + " ty=" + MVT::getValueTypeString(M->getExtraValueType());
+ } else if (const SrcValueSDNode *M = dyn_cast<SrcValueSDNode>(Node)) {
+ if (M->getValue())
+ Op += "<" + M->getValue()->getName() + ":" + itostr(M->getOffset()) + ">";
+ else
+ Op += "<null:" + itostr(M->getOffset()) + ">";
}
return Op;
}