diff options
| author | Craig Topper <craig.topper@gmail.com> | 2016-01-03 07:33:34 +0000 |
|---|---|---|
| committer | Craig Topper <craig.topper@gmail.com> | 2016-01-03 07:33:34 +0000 |
| commit | f58323ef299a7cf54dfe4b87ec597190cc4f5146 (patch) | |
| tree | d15cbb487b75bb9c98f47e60188df2cdfd28fac3 /llvm/utils | |
| parent | 6e526f13f5dc3f590f264e65331ea073285759e3 (diff) | |
| download | bcm5719-llvm-f58323ef299a7cf54dfe4b87ec597190cc4f5146.tar.gz bcm5719-llvm-f58323ef299a7cf54dfe4b87ec597190cc4f5146.zip | |
[TableGen] Fix a bug introduced in r256627. If the switch was not emitted we still emitted a closing curly brace.
llvm-svn: 256697
Diffstat (limited to 'llvm/utils')
| -rw-r--r-- | llvm/utils/TableGen/AsmMatcherEmitter.cpp | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/llvm/utils/TableGen/AsmMatcherEmitter.cpp b/llvm/utils/TableGen/AsmMatcherEmitter.cpp index 4ec08b23db8..2ec65442a33 100644 --- a/llvm/utils/TableGen/AsmMatcherEmitter.cpp +++ b/llvm/utils/TableGen/AsmMatcherEmitter.cpp @@ -2170,11 +2170,12 @@ static void emitIsSubclass(CodeGenTarget &Target, OS << " return false;\n"; } } - OS << " }\n"; // If there were case statements emitted into the string stream write the // default. - if (!EmittedSwitch) + if (EmittedSwitch) + OS << " }\n"; + else OS << " return false;\n"; OS << "}\n\n"; |

