From bd68a052f292b5df7c5717bd880d796ac7507fc0 Mon Sep 17 00:00:00 2001 From: Raphael Isemann Date: Sun, 28 Jul 2019 06:24:07 +0000 Subject: [lldb] Also include the array definition in CommandOptions.inc Summary: Right now our CommandOptions.inc only generates the initializer for the options list but not the array declaration boilerplate around it. As the array definition is identical for all arrays, we might as well also let the CommandOptions.inc generate it alongside the initializers. This patch will also allow us to generate additional declarations related to that option list in the future (e.g. a enum class representing the specific options which would make our handling code less prone). This patch also fixes a few option tables that didn't follow our naming style. Reviewers: JDevlieghere Reviewed By: JDevlieghere Subscribers: abidh, lldb-commits Tags: #lldb Differential Revision: https://reviews.llvm.org/D65331 llvm-svn: 367186 --- lldb/source/Commands/CommandObjectPlatform.cpp | 12 ------------ 1 file changed, 12 deletions(-) (limited to 'lldb/source/Commands/CommandObjectPlatform.cpp') diff --git a/lldb/source/Commands/CommandObjectPlatform.cpp b/lldb/source/Commands/CommandObjectPlatform.cpp index 1088384089c..9080ced54ff 100644 --- a/lldb/source/Commands/CommandObjectPlatform.cpp +++ b/lldb/source/Commands/CommandObjectPlatform.cpp @@ -58,10 +58,8 @@ static mode_t ParsePermissionString(llvm::StringRef permissions) { return user | group | world; } -static constexpr OptionDefinition g_permissions_options[] = { #define LLDB_OPTIONS_permissions #include "CommandOptions.inc" -}; class OptionPermissions : public OptionGroup { public: @@ -574,10 +572,8 @@ public: // "platform fread" -static constexpr OptionDefinition g_platform_fread_options[] = { #define LLDB_OPTIONS_platform_fread #include "CommandOptions.inc" -}; class CommandObjectPlatformFRead : public CommandObjectParsed { public: @@ -665,10 +661,8 @@ protected: // "platform fwrite" -static constexpr OptionDefinition g_platform_fwrite_options[] = { #define LLDB_OPTIONS_platform_fwrite #include "CommandOptions.inc" -}; class CommandObjectPlatformFWrite : public CommandObjectParsed { public: @@ -1042,10 +1036,8 @@ protected: // "platform process list" static PosixPlatformCommandOptionValidator posix_validator; -static constexpr OptionDefinition g_platform_process_list_options[] = { #define LLDB_OPTIONS_platform_process_list #include "CommandOptions.inc" -}; class CommandObjectPlatformProcessList : public CommandObjectParsed { public: @@ -1391,10 +1383,8 @@ protected: } }; -static constexpr OptionDefinition g_platform_process_attach_options[] = { #define LLDB_OPTIONS_platform_process_attach #include "CommandOptions.inc" -}; class CommandObjectPlatformProcessAttach : public CommandObjectParsed { public: @@ -1566,10 +1556,8 @@ private: }; // "platform shell" -static constexpr OptionDefinition g_platform_shell_options[] = { #define LLDB_OPTIONS_platform_shell #include "CommandOptions.inc" -}; class CommandObjectPlatformShell : public CommandObjectRaw { public: -- cgit v1.2.3