summaryrefslogtreecommitdiffstats
path: root/llvm/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
commit9fd95413670ca3ad45245453406ec3480fe9c73a (patch)
treeb51e1839abf318dd942a0db964c706dadc0c757a /llvm/lib/CodeGen/SelectionDAG/SelectionDAG.cpp
parent19b9f15377cd181eac4af22eeb3fe51bef946af7 (diff)
downloadbcm5719-llvm-9fd95413670ca3ad45245453406ec3480fe9c73a.tar.gz
bcm5719-llvm-9fd95413670ca3ad45245453406ec3480fe9c73a.zip
Print out opcode number if it's an unknown target node.
llvm-svn: 24869
Diffstat (limited to 'llvm/lib/CodeGen/SelectionDAG/SelectionDAG.cpp')
-rw-r--r--llvm/lib/CodeGen/SelectionDAG/SelectionDAG.cpp7
1 files changed, 6 insertions, 1 deletions
diff --git a/llvm/lib/CodeGen/SelectionDAG/SelectionDAG.cpp b/llvm/lib/CodeGen/SelectionDAG/SelectionDAG.cpp
index 86ad89e958d..ad8cca742a1 100644
--- a/llvm/lib/CodeGen/SelectionDAG/SelectionDAG.cpp
+++ b/llvm/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";
OpenPOWER on IntegriCloud