Instructions no longer need to have names.
authorChris Lattner <sabre@nondot.org>
Sun, 1 Aug 2004 08:38:17 +0000 (08:38 +0000)
committerChris Lattner <sabre@nondot.org>
Sun, 1 Aug 2004 08:38:17 +0000 (08:38 +0000)
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@15399 91177308-0d34-0410-b5e6-96231b3b80d8

utils/TableGen/InstrInfoEmitter.cpp

index 383e2a63e0de2281145c7baa54ec657533c45a67..3470b2d01b72fcf84f5642cd064e0ebe116767ea 100644 (file)
@@ -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";