From a23e8154dc58a62225074bb4eb1633c363ce331b Mon Sep 17 00:00:00 2001 From: Chris Lattner Date: Thu, 18 Aug 2005 03:31:02 +0000 Subject: [PATCH] Fix printing of VTSDNodes git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@22853 91177308-0d34-0410-b5e6-96231b3b80d8 --- lib/CodeGen/SelectionDAG/SelectionDAG.cpp | 3 +++ lib/CodeGen/SelectionDAG/SelectionDAGPrinter.cpp | 2 ++ 2 files changed, 5 insertions(+) diff --git a/lib/CodeGen/SelectionDAG/SelectionDAG.cpp b/lib/CodeGen/SelectionDAG/SelectionDAG.cpp index cb682c14658..f413010185b 100644 --- a/lib/CodeGen/SelectionDAG/SelectionDAG.cpp +++ b/lib/CodeGen/SelectionDAG/SelectionDAG.cpp @@ -1891,6 +1891,7 @@ const char *SDNode::getOperationName(const SelectionDAG *G) const { case ISD::PCMARKER: return "PCMarker"; case ISD::SRCVALUE: return "SrcValue"; + case ISD::VALUETYPE: return "ValueType"; case ISD::EntryToken: return "EntryToken"; case ISD::TokenFactor: return "TokenFactor"; case ISD::Constant: return "Constant"; @@ -2070,6 +2071,8 @@ void SDNode::dump(const SelectionDAG *G) const { std::cerr << "<" << M->getValue() << ":" << M->getOffset() << ">"; else std::cerr << "getOffset() << ">"; + } else if (const VTSDNode *N = dyn_cast(this)) { + std::cerr << ":" << getValueTypeString(N->getVT()); } } diff --git a/lib/CodeGen/SelectionDAG/SelectionDAGPrinter.cpp b/lib/CodeGen/SelectionDAG/SelectionDAGPrinter.cpp index 20cec1f11d8..2a51d203fe1 100644 --- a/lib/CodeGen/SelectionDAG/SelectionDAGPrinter.cpp +++ b/lib/CodeGen/SelectionDAG/SelectionDAGPrinter.cpp @@ -82,6 +82,8 @@ std::string DOTGraphTraits::getNodeLabel(const SDNode *Node, Op += "<" + M->getValue()->getName() + ":" + itostr(M->getOffset()) + ">"; else Op += "getOffset()) + ">"; + } else if (const VTSDNode *N = dyn_cast(Node)) { + std::cerr << ":" << getValueTypeString(N->getVT()); } return Op; } -- 2.34.1