diff options
| author | Chris Lattner <sabre@nondot.org> | 2009-08-08 00:05:42 +0000 |
|---|---|---|
| committer | Chris Lattner <sabre@nondot.org> | 2009-08-08 00:05:42 +0000 |
| commit | b1692dc26716c5ad22de4c177d52c2bb1f6eaa04 (patch) | |
| tree | 610e810273f2f0d3cf46b964ccfe74dffbf94a0c | |
| parent | 674ffc1e5937490bf6e5b532aff4a08ed44bc9e4 (diff) | |
| download | bcm5719-llvm-b1692dc26716c5ad22de4c177d52c2bb1f6eaa04.tar.gz bcm5719-llvm-b1692dc26716c5ad22de4c177d52c2bb1f6eaa04.zip | |
don't check the result of printInstruction anymore.
llvm-svn: 78444
| -rw-r--r-- | llvm/lib/Target/Alpha/AsmPrinter/AlphaAsmPrinter.cpp | 4 | ||||
| -rw-r--r-- | llvm/lib/Target/MSP430/MSP430AsmPrinter.cpp | 5 | ||||
| -rw-r--r-- | llvm/lib/Target/PowerPC/AsmPrinter/PPCAsmPrinter.cpp | 5 | ||||
| -rw-r--r-- | llvm/lib/Target/SystemZ/AsmPrinter/SystemZAsmPrinter.cpp | 5 | ||||
| -rw-r--r-- | llvm/lib/Target/XCore/XCoreAsmPrinter.cpp | 5 | ||||
| -rw-r--r-- | llvm/utils/TableGen/AsmWriterEmitter.cpp | 11 |
6 files changed, 11 insertions, 24 deletions
diff --git a/llvm/lib/Target/Alpha/AsmPrinter/AlphaAsmPrinter.cpp b/llvm/lib/Target/Alpha/AsmPrinter/AlphaAsmPrinter.cpp index c2152a42b31..92b85d304ca 100644 --- a/llvm/lib/Target/Alpha/AsmPrinter/AlphaAsmPrinter.cpp +++ b/llvm/lib/Target/Alpha/AsmPrinter/AlphaAsmPrinter.cpp @@ -175,9 +175,7 @@ bool AlphaAsmPrinter::runOnMachineFunction(MachineFunction &MF) { II != E; ++II) { // Print the assembly for the instruction. ++EmittedInsts; - if (!printInstruction(II)) { - llvm_unreachable("Unhandled instruction in asm writer!"); - } + printInstruction(II); } } diff --git a/llvm/lib/Target/MSP430/MSP430AsmPrinter.cpp b/llvm/lib/Target/MSP430/MSP430AsmPrinter.cpp index 2da7cdd61ca..573ca57ec0e 100644 --- a/llvm/lib/Target/MSP430/MSP430AsmPrinter.cpp +++ b/llvm/lib/Target/MSP430/MSP430AsmPrinter.cpp @@ -142,10 +142,7 @@ void MSP430AsmPrinter::printMachineInstruction(const MachineInstr *MI) { ++EmittedInsts; // Call the autogenerated instruction printer routines. - if (printInstruction(MI)) - return; - - llvm_unreachable("Should not happen"); + printInstruction(MI); } void MSP430AsmPrinter::printOperand(const MachineInstr *MI, int OpNum, diff --git a/llvm/lib/Target/PowerPC/AsmPrinter/PPCAsmPrinter.cpp b/llvm/lib/Target/PowerPC/AsmPrinter/PPCAsmPrinter.cpp index d7e050f6409..8a0c767db58 100644 --- a/llvm/lib/Target/PowerPC/AsmPrinter/PPCAsmPrinter.cpp +++ b/llvm/lib/Target/PowerPC/AsmPrinter/PPCAsmPrinter.cpp @@ -571,10 +571,7 @@ void PPCAsmPrinter::printMachineInstruction(const MachineInstr *MI) { } } - if (printInstruction(MI)) - return; // Printer was automatically generated - - llvm_unreachable("Unhandled instruction in asm writer!"); + printInstruction(MI); } /// runOnMachineFunction - This uses the printMachineInstruction() diff --git a/llvm/lib/Target/SystemZ/AsmPrinter/SystemZAsmPrinter.cpp b/llvm/lib/Target/SystemZ/AsmPrinter/SystemZAsmPrinter.cpp index b82396895f9..2c73517db9b 100644 --- a/llvm/lib/Target/SystemZ/AsmPrinter/SystemZAsmPrinter.cpp +++ b/llvm/lib/Target/SystemZ/AsmPrinter/SystemZAsmPrinter.cpp @@ -152,10 +152,7 @@ void SystemZAsmPrinter::printMachineInstruction(const MachineInstr *MI) { ++EmittedInsts; // Call the autogenerated instruction printer routines. - if (printInstruction(MI)) - return; - - llvm_unreachable("Unreachable!"); + printInstruction(MI); } void SystemZAsmPrinter::printPCRelImmOperand(const MachineInstr *MI, int OpNum) { diff --git a/llvm/lib/Target/XCore/XCoreAsmPrinter.cpp b/llvm/lib/Target/XCore/XCoreAsmPrinter.cpp index dc312129d23..1b08c5f4c37 100644 --- a/llvm/lib/Target/XCore/XCoreAsmPrinter.cpp +++ b/llvm/lib/Target/XCore/XCoreAsmPrinter.cpp @@ -364,10 +364,7 @@ void XCoreAsmPrinter::printMachineInstruction(const MachineInstr *MI) { O << "\n"; return; } - if (printInstruction(MI)) { - return; - } - llvm_unreachable("Unhandled instruction in asm writer!"); + printInstruction(MI); } bool XCoreAsmPrinter::doInitialization(Module &M) { diff --git a/llvm/utils/TableGen/AsmWriterEmitter.cpp b/llvm/utils/TableGen/AsmWriterEmitter.cpp index db23febbfb0..95d4aac1300 100644 --- a/llvm/utils/TableGen/AsmWriterEmitter.cpp +++ b/llvm/utils/TableGen/AsmWriterEmitter.cpp @@ -113,12 +113,14 @@ namespace llvm { std::string AsmWriterOperand::getCode() const { - if (OperandType == isLiteralTextOperand) + if (OperandType == isLiteralTextOperand) { + if (Str.size() == 1) + return "O << '" + Str + "'; "; return "O << \"" + Str + "\"; "; + } - if (OperandType == isLiteralStatementOperand) { + if (OperandType == isLiteralStatementOperand) return Str; - } std::string Result = Str + "(MI"; if (MIOpNo != ~0U) @@ -448,9 +450,8 @@ FindUniqueOperandCommands(std::vector<std::string> &UniqueOperandCommands, Command = " " + Inst->Operands[0].getCode() + "\n"; // If this is the last operand, emit a return. - if (Inst->Operands.size() == 1) { + if (Inst->Operands.size() == 1) Command += " return true;\n"; - } // Check to see if we already have 'Command' in UniqueOperandCommands. // If not, add it. |

