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 | 168705049c55feec88aec65af0aef07fc1376ce6 (patch) | |
tree | 622283036aeeb10ddf80d85524f4df832966c0e1 /utils | |
parent | 895dda6fb541a4c56b58dafaaa767b980b27b0c6 (diff) | |
download | llvm-168705049c55feec88aec65af0aef07fc1376ce6.tar.gz llvm-168705049c55feec88aec65af0aef07fc1376ce6.tar.bz2 llvm-168705049c55feec88aec65af0aef07fc1376ce6.tar.xz |
Handle the odd case where we only have one instruction.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@114293 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'utils')
-rw-r--r-- | utils/TableGen/AsmWriterEmitter.cpp | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/utils/TableGen/AsmWriterEmitter.cpp b/utils/TableGen/AsmWriterEmitter.cpp index 23f13c2ae2..44622e937d 100644 --- a/utils/TableGen/AsmWriterEmitter.cpp +++ b/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" |