[llvm-commits] CVS: llvm/lib/CodeGen/SelectionDAG/SelectionDAG.cpp
Chris Lattner
lattner at cs.uiuc.edu
Fri Sep 9 15:35:19 PDT 2005
Changes in directory llvm/lib/CodeGen/SelectionDAG:
SelectionDAG.cpp updated: 1.190 -> 1.191
---
Log message:
Fix a crash viewing dags that have target nodes in them
---
Diffs of the changes: (+2 -1)
SelectionDAG.cpp | 3 ++-
1 files changed, 2 insertions(+), 1 deletion(-)
Index: llvm/lib/CodeGen/SelectionDAG/SelectionDAG.cpp
diff -u llvm/lib/CodeGen/SelectionDAG/SelectionDAG.cpp:1.190 llvm/lib/CodeGen/SelectionDAG/SelectionDAG.cpp:1.191
--- llvm/lib/CodeGen/SelectionDAG/SelectionDAG.cpp:1.190 Fri Sep 9 14:49:52 2005
+++ llvm/lib/CodeGen/SelectionDAG/SelectionDAG.cpp Fri Sep 9 17:35:03 2005
@@ -2263,7 +2263,8 @@
else {
if (G)
if (const TargetInstrInfo *TII = G->getTarget().getInstrInfo())
- return TII->getName(getOpcode()-ISD::BUILTIN_OP_END);
+ if (getOpcode()-ISD::BUILTIN_OP_END < TII->getNumOpcodes())
+ return TII->getName(getOpcode()-ISD::BUILTIN_OP_END);
return "<<Unknown Target Node>>";
}
More information about the llvm-commits
mailing list