From: Evan Cheng Date: Wed, 1 Nov 2006 04:48:30 +0000 (+0000) Subject: Print jumptable index. X-Git-Url: http://plrg.eecs.uci.edu/git/?a=commitdiff_plain;h=6cc31ae4da958abc85309f2160e64d6effaa2d3c;p=oota-llvm.git Print jumptable index. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@31340 91177308-0d34-0410-b5e6-96231b3b80d8 --- diff --git a/lib/CodeGen/SelectionDAG/SelectionDAG.cpp b/lib/CodeGen/SelectionDAG/SelectionDAG.cpp index 3d8441c5124..16c0718c7d3 100644 --- a/lib/CodeGen/SelectionDAG/SelectionDAG.cpp +++ b/lib/CodeGen/SelectionDAG/SelectionDAG.cpp @@ -2851,6 +2851,8 @@ void SDNode::dump(const SelectionDAG *G) const { std::cerr << " " << offset; } else if (const FrameIndexSDNode *FIDN = dyn_cast(this)) { std::cerr << "<" << FIDN->getIndex() << ">"; + } else if (const JumpTableSDNode *JTDN = dyn_cast(this)) { + std::cerr << "<" << JTDN->getIndex() << ">"; } else if (const ConstantPoolSDNode *CP = dyn_cast(this)){ int offset = CP->getOffset(); if (CP->isMachineConstantPoolEntry()) diff --git a/lib/CodeGen/SelectionDAG/SelectionDAGPrinter.cpp b/lib/CodeGen/SelectionDAG/SelectionDAGPrinter.cpp index 2c392d9d64d..95daced87bc 100644 --- a/lib/CodeGen/SelectionDAG/SelectionDAGPrinter.cpp +++ b/lib/CodeGen/SelectionDAG/SelectionDAGPrinter.cpp @@ -105,6 +105,8 @@ std::string DOTGraphTraits::getNodeLabel(const SDNode *Node, Op += itostr(offset); } else if (const FrameIndexSDNode *FIDN = dyn_cast(Node)) { Op += " " + itostr(FIDN->getIndex()); + } else if (const JumpTableSDNode *JTDN = dyn_cast(Node)) { + Op += " " + itostr(JTDN->getIndex()); } else if (const ConstantPoolSDNode *CP = dyn_cast(Node)){ if (CP->isMachineConstantPoolEntry()) { std::ostringstream SS;