projects
/
oota-llvm.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
c9fe750
)
Fix a crash viewing dags that have target nodes in them
author
Chris Lattner
<sabre@nondot.org>
Fri, 9 Sep 2005 22:35:03 +0000
(22:35 +0000)
committer
Chris Lattner
<sabre@nondot.org>
Fri, 9 Sep 2005 22:35:03 +0000
(22:35 +0000)
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@23300
91177308
-0d34-0410-b5e6-
96231b3b80d8
lib/CodeGen/SelectionDAG/SelectionDAG.cpp
patch
|
blob
|
history
diff --git
a/lib/CodeGen/SelectionDAG/SelectionDAG.cpp
b/lib/CodeGen/SelectionDAG/SelectionDAG.cpp
index ae0c2c8d7122729794f4cb759b3b25ca8f3031b9..c27523ae13133d3ec09325f872f5df0ae1ee2428 100644
(file)
--- a/
lib/CodeGen/SelectionDAG/SelectionDAG.cpp
+++ b/
lib/CodeGen/SelectionDAG/SelectionDAG.cpp
@@
-2263,7
+2263,8
@@
const char *SDNode::getOperationName(const SelectionDAG *G) const {
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>>";
}