From 7ced9fff95473c1794b51a3cfd099b4fea3d1a58 Mon Sep 17 00:00:00 2001 From: Jonas Devlieghere Date: Wed, 13 Jul 2022 20:11:37 -0700 Subject: [lldb] Refactor command option enum values (NFC) Refactor the command option enum values and the command argument table to connect the two. This has two benefits: - We guarantee that two options that use the same argument type have the same accepted values. - We can print the enum values and their description in the help output. (D129707) Differential revision: https://reviews.llvm.org/D129703 --- lldb/source/Commands/CommandObjectExpression.cpp | 18 +----------------- 1 file changed, 1 insertion(+), 17 deletions(-) (limited to 'lldb/source/Commands/CommandObjectExpression.cpp') diff --git a/lldb/source/Commands/CommandObjectExpression.cpp b/lldb/source/Commands/CommandObjectExpression.cpp index 59c2cdb..0fb5042 100644 --- a/lldb/source/Commands/CommandObjectExpression.cpp +++ b/lldb/source/Commands/CommandObjectExpression.cpp @@ -14,6 +14,7 @@ #include "lldb/Expression/UserExpression.h" #include "lldb/Host/OptionParser.h" #include "lldb/Interpreter/CommandInterpreter.h" +#include "lldb/Interpreter/CommandOptionArgumentTable.h" #include "lldb/Interpreter/CommandReturnObject.h" #include "lldb/Interpreter/OptionArgParser.h" #include "lldb/Target/Language.h" @@ -28,23 +29,6 @@ CommandObjectExpression::CommandOptions::CommandOptions() = default; CommandObjectExpression::CommandOptions::~CommandOptions() = default; -static constexpr OptionEnumValueElement g_description_verbosity_type[] = { - { - eLanguageRuntimeDescriptionDisplayVerbosityCompact, - "compact", - "Only show the description string", - }, - { - eLanguageRuntimeDescriptionDisplayVerbosityFull, - "full", - "Show the full output, including persistent variable's name and type", - }, -}; - -static constexpr OptionEnumValues DescriptionVerbosityTypes() { - return OptionEnumValues(g_description_verbosity_type); -} - #define LLDB_OPTIONS_expression #include "CommandOptions.inc" -- cgit v1.1