Print jumptable index.
authorEvan Cheng <evan.cheng@apple.com>
Wed, 1 Nov 2006 04:48:30 +0000 (04:48 +0000)
committerEvan Cheng <evan.cheng@apple.com>
Wed, 1 Nov 2006 04:48:30 +0000 (04:48 +0000)
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@31340 91177308-0d34-0410-b5e6-96231b3b80d8

lib/CodeGen/SelectionDAG/SelectionDAG.cpp
lib/CodeGen/SelectionDAG/SelectionDAGPrinter.cpp

index 3d8441c51240dde8a6d2f34935badac93744895a..16c0718c7d3848261443060b16da45cf7bda7922 100644 (file)
@@ -2851,6 +2851,8 @@ void SDNode::dump(const SelectionDAG *G) const {
       std::cerr << " " << offset;
   } else if (const FrameIndexSDNode *FIDN = dyn_cast<FrameIndexSDNode>(this)) {
     std::cerr << "<" << FIDN->getIndex() << ">";
+  } else if (const JumpTableSDNode *JTDN = dyn_cast<JumpTableSDNode>(this)) {
+    std::cerr << "<" << JTDN->getIndex() << ">";
   } else if (const ConstantPoolSDNode *CP = dyn_cast<ConstantPoolSDNode>(this)){
     int offset = CP->getOffset();
     if (CP->isMachineConstantPoolEntry())
index 2c392d9d64d67cfb095e9fb088d4ca0e7cc4dbae..95daced87bc015ef5b5dd2ef6ae91677a1a1b7ad 100644 (file)
@@ -105,6 +105,8 @@ std::string DOTGraphTraits<SelectionDAG*>::getNodeLabel(const SDNode *Node,
       Op += itostr(offset);
   } else if (const FrameIndexSDNode *FIDN = dyn_cast<FrameIndexSDNode>(Node)) {
     Op += " " + itostr(FIDN->getIndex());
+  } else if (const JumpTableSDNode *JTDN = dyn_cast<JumpTableSDNode>(Node)) {
+    Op += " " + itostr(JTDN->getIndex());
   } else if (const ConstantPoolSDNode *CP = dyn_cast<ConstantPoolSDNode>(Node)){
     if (CP->isMachineConstantPoolEntry()) {
       std::ostringstream SS;