summaryrefslogtreecommitdiff
path: root/utils
diff options
context:
space:
mode:
authorChris Lattner <sabre@nondot.org>2009-08-08 00:05:42 +0000
committerChris Lattner <sabre@nondot.org>2009-08-08 00:05:42 +0000
commit2698cb6811276736a8e892e545609a9048a917fe (patch)
tree9db5c3c0b98e41dc11da6b27698b72cb4e055458 /utils
parent941222eea05cb5e0bf6b1789c3d6beb4e66cc375 (diff)
downloadllvm-2698cb6811276736a8e892e545609a9048a917fe.tar.gz
llvm-2698cb6811276736a8e892e545609a9048a917fe.tar.bz2
llvm-2698cb6811276736a8e892e545609a9048a917fe.tar.xz
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
Diffstat (limited to 'utils')
-rw-r--r--utils/TableGen/AsmWriterEmitter.cpp11
1 files changed, 6 insertions, 5 deletions
diff --git a/utils/TableGen/AsmWriterEmitter.cpp b/utils/TableGen/AsmWriterEmitter.cpp
index db23febbfb..95d4aac130 100644
--- a/utils/TableGen/AsmWriterEmitter.cpp
+++ b/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.