diff options
author | Eric Christopher <echristo@apple.com> | 2010-09-18 18:50:27 +0000 |
---|---|---|
committer | Eric Christopher <echristo@apple.com> | 2010-09-18 18:50:27 +0000 |
commit | a573d19662fd30a55f8b731a7e98123d8450536f (patch) | |
tree | 71896dced2b1f406e1ed5c7ea0427975b7cdc75e | |
parent | abf60e3421a603da78e56ac6f471f257028b792d (diff) | |
download | bcm5719-llvm-a573d19662fd30a55f8b731a7e98123d8450536f.tar.gz bcm5719-llvm-a573d19662fd30a55f8b731a7e98123d8450536f.zip |
Handle the odd case where we only have one instruction.
llvm-svn: 114293
-rw-r--r-- | llvm/utils/TableGen/AsmWriterEmitter.cpp | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/llvm/utils/TableGen/AsmWriterEmitter.cpp b/llvm/utils/TableGen/AsmWriterEmitter.cpp index 23f13c2ae2d..44622e937da 100644 --- a/llvm/utils/TableGen/AsmWriterEmitter.cpp +++ b/llvm/utils/TableGen/AsmWriterEmitter.cpp @@ -403,6 +403,9 @@ void AsmWriterEmitter::EmitPrintInstruction(raw_ostream &O) { << " } else {\n" << Commands[0] << " }\n\n"; + } else if (Commands.size() == 1) { + // Emit a single possibility. + O << Commands[0] << "\n\n"; } else { O << " switch ((Bits >> " << (BitsLeft+AsmStrBits) << ") & " << ((1 << NumBits)-1) << ") {\n" |