mirror of
https://github.com/RPCS3/llvm-mirror.git
synced 2024-11-24 11:42:57 +01:00
don't check the result of printInstruction anymore.
llvm-svn: 78444
This commit is contained in:
parent
e02d21a125
commit
2fc10a4dd9
@ -175,9 +175,7 @@ bool AlphaAsmPrinter::runOnMachineFunction(MachineFunction &MF) {
|
|||||||
II != E; ++II) {
|
II != E; ++II) {
|
||||||
// Print the assembly for the instruction.
|
// Print the assembly for the instruction.
|
||||||
++EmittedInsts;
|
++EmittedInsts;
|
||||||
if (!printInstruction(II)) {
|
printInstruction(II);
|
||||||
llvm_unreachable("Unhandled instruction in asm writer!");
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -142,10 +142,7 @@ void MSP430AsmPrinter::printMachineInstruction(const MachineInstr *MI) {
|
|||||||
++EmittedInsts;
|
++EmittedInsts;
|
||||||
|
|
||||||
// Call the autogenerated instruction printer routines.
|
// Call the autogenerated instruction printer routines.
|
||||||
if (printInstruction(MI))
|
printInstruction(MI);
|
||||||
return;
|
|
||||||
|
|
||||||
llvm_unreachable("Should not happen");
|
|
||||||
}
|
}
|
||||||
|
|
||||||
void MSP430AsmPrinter::printOperand(const MachineInstr *MI, int OpNum,
|
void MSP430AsmPrinter::printOperand(const MachineInstr *MI, int OpNum,
|
||||||
|
@ -571,10 +571,7 @@ void PPCAsmPrinter::printMachineInstruction(const MachineInstr *MI) {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if (printInstruction(MI))
|
printInstruction(MI);
|
||||||
return; // Printer was automatically generated
|
|
||||||
|
|
||||||
llvm_unreachable("Unhandled instruction in asm writer!");
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/// runOnMachineFunction - This uses the printMachineInstruction()
|
/// runOnMachineFunction - This uses the printMachineInstruction()
|
||||||
|
@ -152,10 +152,7 @@ void SystemZAsmPrinter::printMachineInstruction(const MachineInstr *MI) {
|
|||||||
++EmittedInsts;
|
++EmittedInsts;
|
||||||
|
|
||||||
// Call the autogenerated instruction printer routines.
|
// Call the autogenerated instruction printer routines.
|
||||||
if (printInstruction(MI))
|
printInstruction(MI);
|
||||||
return;
|
|
||||||
|
|
||||||
llvm_unreachable("Unreachable!");
|
|
||||||
}
|
}
|
||||||
|
|
||||||
void SystemZAsmPrinter::printPCRelImmOperand(const MachineInstr *MI, int OpNum) {
|
void SystemZAsmPrinter::printPCRelImmOperand(const MachineInstr *MI, int OpNum) {
|
||||||
|
@ -364,10 +364,7 @@ void XCoreAsmPrinter::printMachineInstruction(const MachineInstr *MI) {
|
|||||||
O << "\n";
|
O << "\n";
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
if (printInstruction(MI)) {
|
printInstruction(MI);
|
||||||
return;
|
|
||||||
}
|
|
||||||
llvm_unreachable("Unhandled instruction in asm writer!");
|
|
||||||
}
|
}
|
||||||
|
|
||||||
bool XCoreAsmPrinter::doInitialization(Module &M) {
|
bool XCoreAsmPrinter::doInitialization(Module &M) {
|
||||||
|
@ -113,13 +113,15 @@ namespace llvm {
|
|||||||
|
|
||||||
|
|
||||||
std::string AsmWriterOperand::getCode() const {
|
std::string AsmWriterOperand::getCode() const {
|
||||||
if (OperandType == isLiteralTextOperand)
|
if (OperandType == isLiteralTextOperand) {
|
||||||
|
if (Str.size() == 1)
|
||||||
|
return "O << '" + Str + "'; ";
|
||||||
return "O << \"" + Str + "\"; ";
|
return "O << \"" + Str + "\"; ";
|
||||||
|
|
||||||
if (OperandType == isLiteralStatementOperand) {
|
|
||||||
return Str;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (OperandType == isLiteralStatementOperand)
|
||||||
|
return Str;
|
||||||
|
|
||||||
std::string Result = Str + "(MI";
|
std::string Result = Str + "(MI";
|
||||||
if (MIOpNo != ~0U)
|
if (MIOpNo != ~0U)
|
||||||
Result += ", " + utostr(MIOpNo);
|
Result += ", " + utostr(MIOpNo);
|
||||||
@ -448,9 +450,8 @@ FindUniqueOperandCommands(std::vector<std::string> &UniqueOperandCommands,
|
|||||||
Command = " " + Inst->Operands[0].getCode() + "\n";
|
Command = " " + Inst->Operands[0].getCode() + "\n";
|
||||||
|
|
||||||
// If this is the last operand, emit a return.
|
// If this is the last operand, emit a return.
|
||||||
if (Inst->Operands.size() == 1) {
|
if (Inst->Operands.size() == 1)
|
||||||
Command += " return true;\n";
|
Command += " return true;\n";
|
||||||
}
|
|
||||||
|
|
||||||
// Check to see if we already have 'Command' in UniqueOperandCommands.
|
// Check to see if we already have 'Command' in UniqueOperandCommands.
|
||||||
// If not, add it.
|
// If not, add it.
|
||||||
|
Loading…
Reference in New Issue
Block a user