[llvm-commits] CVS: llvm/lib/CodeGen/SelectionDAG/SelectionDAG.cpp

Evan Cheng evan.cheng at apple.com
Mon Dec 19 15:12:01 PST 2005



Changes in directory llvm/lib/CodeGen/SelectionDAG:

SelectionDAG.cpp updated: 1.226 -> 1.227
---
Log message:

Print out opcode number if it's an unknown target node.


---
Diffs of the changes:  (+6 -1)

 SelectionDAG.cpp |    7 ++++++-
 1 files changed, 6 insertions(+), 1 deletion(-)


Index: llvm/lib/CodeGen/SelectionDAG/SelectionDAG.cpp
diff -u llvm/lib/CodeGen/SelectionDAG/SelectionDAG.cpp:1.226 llvm/lib/CodeGen/SelectionDAG/SelectionDAG.cpp:1.227
--- llvm/lib/CodeGen/SelectionDAG/SelectionDAG.cpp:1.226	Mon Dec 19 16:21:21 2005
+++ llvm/lib/CodeGen/SelectionDAG/SelectionDAG.cpp	Mon Dec 19 17:11:49 2005
@@ -21,6 +21,7 @@
 #include "llvm/Target/TargetLowering.h"
 #include "llvm/Target/TargetInstrInfo.h"
 #include "llvm/Target/TargetMachine.h"
+#include "llvm/ADT/StringExtras.h"
 #include <iostream>
 #include <set>
 #include <cmath>
@@ -1838,7 +1839,11 @@
         if (const TargetInstrInfo *TII = G->getTarget().getInstrInfo())
           if (getOpcode()-ISD::BUILTIN_OP_END < TII->getNumOpcodes())
             return TII->getName(getOpcode()-ISD::BUILTIN_OP_END);
-      return "<<Unknown Target Node>>";
+
+      std::string Name
+        = "<<Unknown Target Node:"
+        + itostr((int)getOpcode()-ISD::BUILTIN_OP_END) + ">>";
+      return Name.c_str();
     }
    
   case ISD::PCMARKER:      return "PCMarker";






More information about the llvm-commits mailing list