aboutsummaryrefslogtreecommitdiff
path: root/lldb/source/Commands/OptionsBase.td
diff options
context:
space:
mode:
authorJonas Devlieghere <jonas@devlieghere.com>2022-07-13 20:11:37 -0700
committerJonas Devlieghere <jonas@devlieghere.com>2022-07-14 21:18:07 -0700
commit7ced9fff95473c1794b51a3cfd099b4fea3d1a58 (patch)
tree327c5419e195d917e3a127edc8f5d0c725455fd3 /lldb/source/Commands/OptionsBase.td
parent888673b6e3bf0182fb5f154eb3231c9ae022acca (diff)
downloadllvm-7ced9fff95473c1794b51a3cfd099b4fea3d1a58.zip
llvm-7ced9fff95473c1794b51a3cfd099b4fea3d1a58.tar.gz
llvm-7ced9fff95473c1794b51a3cfd099b4fea3d1a58.tar.bz2
[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
Diffstat (limited to 'lldb/source/Commands/OptionsBase.td')
-rw-r--r--lldb/source/Commands/OptionsBase.td6
1 files changed, 2 insertions, 4 deletions
diff --git a/lldb/source/Commands/OptionsBase.td b/lldb/source/Commands/OptionsBase.td
index f6967f0..9612cc1 100644
--- a/lldb/source/Commands/OptionsBase.td
+++ b/lldb/source/Commands/OptionsBase.td
@@ -151,15 +151,13 @@ class Arg<string type> {
}
// Gives the option an required argument.
-class EnumArg<string type, string enum> {
+class EnumArg<string type> {
string ArgType = type;
- string ArgEnum = enum;
}
// Gives the option an required argument.
-class OptionalEnumArg<string type, string enum> {
+class OptionalEnumArg<string type> {
string ArgType = type;
- string ArgEnum = enum;
bit OptionalArg = 1;
}