mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2024-08-18 12:29:21 +00:00
Fix a crash viewing dags that have target nodes in them
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@23300 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
parent
c9fe7508a5
commit
08addbd477
@ -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>>";
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user