aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--utils/TableGen/InstrInfoEmitter.cpp7
1 files changed, 6 insertions, 1 deletions
diff --git a/utils/TableGen/InstrInfoEmitter.cpp b/utils/TableGen/InstrInfoEmitter.cpp
index 383e2a63e0..3470b2d01b 100644
--- a/utils/TableGen/InstrInfoEmitter.cpp
+++ b/utils/TableGen/InstrInfoEmitter.cpp
@@ -97,7 +97,12 @@ void InstrInfoEmitter::run(std::ostream &OS) {
void InstrInfoEmitter::emitRecord(const CodeGenInstruction &Inst, unsigned Num,
Record *InstrInfo, std::ostream &OS) {
- OS << " { \"" << Inst.Name << "\",\t-1, -1, 0, false, 0, 0, 0, 0";
+ OS << " { \"";
+ if (Inst.Name.empty())
+ OS << Inst.TheDef->getName();
+ else
+ OS << Inst.Name;
+ OS << "\",\t-1, -1, 0, false, 0, 0, 0, 0";
// Emit all of the target indepedent flags...
if (Inst.isReturn) OS << "|M_RET_FLAG";