From e8d6a915235f7e986292b3f2affe0fe5bbbae4ed Mon Sep 17 00:00:00 2001 From: Jan Svoboda Date: Mon, 16 Nov 2020 14:30:54 +0100 Subject: [PATCH] [clang][cli] Turn arcmt-* options into a single option - The new option, -arcmt-action, is a simple enum based option. - The driver is modified to translate the existing -ccc-acmt-* options accordingly Depends on D83298 Reviewed By: Bigcheese Original patch by Daniel Grumberg. Differential Revision: https://reviews.llvm.org/D83315 --- include/llvm/Option/OptParser.td | 3 +++ utils/TableGen/OptParserEmitter.cpp | 2 +- 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/include/llvm/Option/OptParser.td b/include/llvm/Option/OptParser.td index 85874478e59..12d2286ed89 100644 --- a/include/llvm/Option/OptParser.td +++ b/include/llvm/Option/OptParser.td @@ -199,6 +199,9 @@ class AutoNormalizeEnum { code Normalizer = "normalizeSimpleEnum"; code Denormalizer = "denormalizeSimpleEnum"; } +class AutoNormalizeEnumJoined : AutoNormalizeEnum { + code Denormalizer = "denormalizeSimpleEnumJoined"; +} class ValueMerger { code ValueMerger = merger; } class ValueExtractor { code ValueExtractor = extractor; } diff --git a/utils/TableGen/OptParserEmitter.cpp b/utils/TableGen/OptParserEmitter.cpp index 88f5dd3658c..4e164fe2835 100644 --- a/utils/TableGen/OptParserEmitter.cpp +++ b/utils/TableGen/OptParserEmitter.cpp @@ -114,7 +114,7 @@ struct SimpleEnumValueTable { OS << ", "; emitScopedNormalizedValue(OS, DefaultValue); OS << ", "; - emitScopedNormalizedValue(OS, NormalizerRetTy); + OS << NormalizerRetTy; OS << ", "; OS << Normalizer; OS << ", ";