summaryrefslogtreecommitdiffstats
path: root/llvm/utils/TableGen/AsmMatcherEmitter.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'llvm/utils/TableGen/AsmMatcherEmitter.cpp')
-rw-r--r--llvm/utils/TableGen/AsmMatcherEmitter.cpp5
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";
OpenPOWER on IntegriCloud