From: Evan Cheng Date: Mon, 19 Dec 2005 23:11:49 +0000 (+0000) Subject: Print out opcode number if it's an unknown target node. X-Git-Url: http://demsky.eecs.uci.edu/git/?a=commitdiff_plain;h=115c036a4c83cd277ffac0867a21b34f63829db7;p=oota-llvm.git 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 --- diff --git a/lib/CodeGen/SelectionDAG/SelectionDAG.cpp b/lib/CodeGen/SelectionDAG/SelectionDAG.cpp index 86ad89e958d..ad8cca742a1 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 #include #include @@ -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 "<>"; + + std::string Name + = "<>"; + return Name.c_str(); } case ISD::PCMARKER: return "PCMarker";