aboutsummaryrefslogtreecommitdiff
path: root/lib/CodeGen/SelectionDAG/SelectionDAG.cpp
diff options
context:
space:
mode:
authorEvan Cheng <evan.cheng@apple.com>2005-12-19 23:11:49 +0000
committerEvan Cheng <evan.cheng@apple.com>2005-12-19 23:11:49 +0000
commit115c036a4c83cd277ffac0867a21b34f63829db7 (patch)
treea29607fc927fe8b51a0ed9f2c260935ba0eadbe2 /lib/CodeGen/SelectionDAG/SelectionDAG.cpp
parentf9fc25db32de9fe16134f0d631acc3c84487259c (diff)
Print out opcode number if it's an unknown target node.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@24869 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/CodeGen/SelectionDAG/SelectionDAG.cpp')
-rw-r--r--lib/CodeGen/SelectionDAG/SelectionDAG.cpp7
1 files changed, 6 insertions, 1 deletions
diff --git a/lib/CodeGen/SelectionDAG/SelectionDAG.cpp b/lib/CodeGen/SelectionDAG/SelectionDAG.cpp
index 86ad89e958..ad8cca742a 100644
--- a/lib/CodeGen/SelectionDAG/SelectionDAG.cpp
+++ b/lib/CodeGen/SelectionDAG/SelectionDAG.cpp
@@ -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 @@ const char *SDNode::getOperationName(const SelectionDAG *G) const {
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";