summaryrefslogtreecommitdiffstats
path: root/lldb/source/Commands/CommandObjectPlatform.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'lldb/source/Commands/CommandObjectPlatform.cpp')
-rw-r--r--lldb/source/Commands/CommandObjectPlatform.cpp20
1 files changed, 2 insertions, 18 deletions
diff --git a/lldb/source/Commands/CommandObjectPlatform.cpp b/lldb/source/Commands/CommandObjectPlatform.cpp
index d1054020c81..1088384089c 100644
--- a/lldb/source/Commands/CommandObjectPlatform.cpp
+++ b/lldb/source/Commands/CommandObjectPlatform.cpp
@@ -1041,7 +1041,8 @@ protected:
// "platform process list"
-static OptionDefinition g_platform_process_list_options[] = {
+static PosixPlatformCommandOptionValidator posix_validator;
+static constexpr OptionDefinition g_platform_process_list_options[] = {
#define LLDB_OPTIONS_platform_process_list
#include "CommandOptions.inc"
};
@@ -1166,23 +1167,6 @@ protected:
public:
CommandOptions()
: Options(), match_info(), show_args(false), verbose(false) {
- static llvm::once_flag g_once_flag;
- llvm::call_once(g_once_flag, []() {
- PosixPlatformCommandOptionValidator *posix_validator =
- new PosixPlatformCommandOptionValidator();
- for (auto &Option : g_platform_process_list_options) {
- switch (Option.short_option) {
- case 'u':
- case 'U':
- case 'g':
- case 'G':
- Option.validator = posix_validator;
- break;
- default:
- break;
- }
- }
- });
}
~CommandOptions() override = default;
OpenPOWER on IntegriCloud