From 2d12b2cf7513e7ee855deec0de293311d676cb75 Mon Sep 17 00:00:00 2001 From: Chris Lattner Date: Sun, 1 Aug 2004 08:38:17 +0000 Subject: [PATCH] Instructions no longer need to have names. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@15399 91177308-0d34-0410-b5e6-96231b3b80d8 --- utils/TableGen/InstrInfoEmitter.cpp | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/utils/TableGen/InstrInfoEmitter.cpp b/utils/TableGen/InstrInfoEmitter.cpp index 383e2a63e0d..3470b2d01b7 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"; -- 2.34.1