llvm.org GIT mirror llvm / 2698cb6
don't check the result of printInstruction anymore. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@78444 91177308-0d34-0410-b5e6-96231b3b80d8 Chris Lattner 10 years ago
6 changed file(s) with 12 addition(s) and 25 deletion(s). Raw diff Collapse all Expand all
174174 II != E; ++II) {
175175 // Print the assembly for the instruction.
176176 ++EmittedInsts;
177 if (!printInstruction(II)) {
178 llvm_unreachable("Unhandled instruction in asm writer!");
179 }
177 printInstruction(II);
180178 }
181179 }
182180
141141 ++EmittedInsts;
142142
143143 // Call the autogenerated instruction printer routines.
144 if (printInstruction(MI))
145 return;
146
147 llvm_unreachable("Should not happen");
144 printInstruction(MI);
148145 }
149146
150147 void MSP430AsmPrinter::printOperand(const MachineInstr *MI, int OpNum,
570570 }
571571 }
572572
573 if (printInstruction(MI))
574 return; // Printer was automatically generated
575
576 llvm_unreachable("Unhandled instruction in asm writer!");
573 printInstruction(MI);
577574 }
578575
579576 /// runOnMachineFunction - This uses the printMachineInstruction()
151151 ++EmittedInsts;
152152
153153 // Call the autogenerated instruction printer routines.
154 if (printInstruction(MI))
155 return;
156
157 llvm_unreachable("Unreachable!");
154 printInstruction(MI);
158155 }
159156
160157 void SystemZAsmPrinter::printPCRelImmOperand(const MachineInstr *MI, int OpNum) {
363363 O << "\n";
364364 return;
365365 }
366 if (printInstruction(MI)) {
367 return;
368 }
369 llvm_unreachable("Unhandled instruction in asm writer!");
366 printInstruction(MI);
370367 }
371368
372369 bool XCoreAsmPrinter::doInitialization(Module &M) {
112112
113113
114114 std::string AsmWriterOperand::getCode() const {
115 if (OperandType == isLiteralTextOperand)
115 if (OperandType == isLiteralTextOperand) {
116 if (Str.size() == 1)
117 return "O << '" + Str + "'; ";
116118 return "O << \"" + Str + "\"; ";
117
118 if (OperandType == isLiteralStatementOperand) {
119 }
120
121 if (OperandType == isLiteralStatementOperand)
119122 return Str;
120 }
121123
122124 std::string Result = Str + "(MI";
123125 if (MIOpNo != ~0U)
447449 Command = " " + Inst->Operands[0].getCode() + "\n";
448450
449451 // If this is the last operand, emit a return.
450 if (Inst->Operands.size() == 1) {
452 if (Inst->Operands.size() == 1)
451453 Command += " return true;\n";
452 }
453454
454455 // Check to see if we already have 'Command' in UniqueOperandCommands.
455456 // If not, add it.