diff options
author | Bruce Mitchener <bruce.mitchener@gmail.com> | 2015-10-07 16:56:17 +0000 |
---|---|---|
committer | Bruce Mitchener <bruce.mitchener@gmail.com> | 2015-10-07 16:56:17 +0000 |
commit | 13d21e9ae103e4901416ebfdabd47ccf67a80d38 (patch) | |
tree | ab40a63d10f6c8b52b16769230fbfec3bc8af287 /lldb/source/Commands/CommandObjectMemory.cpp | |
parent | b8269c7228a6b25795b0bd414262b9e788a0f0e3 (diff) | |
download | llvm-13d21e9ae103e4901416ebfdabd47ccf67a80d38.zip llvm-13d21e9ae103e4901416ebfdabd47ccf67a80d38.tar.gz llvm-13d21e9ae103e4901416ebfdabd47ccf67a80d38.tar.bz2 |
commands: Use override instead of virtual.
Summary:
This removes all uses of virtual on functions
where override could be used, including on destructors.
It also adds override where virtual was previously
missing.
Reviewers: clayborg, labath
Subscribers: lldb-commits
Differential Revision: http://reviews.llvm.org/D13503
llvm-svn: 249564
Diffstat (limited to 'lldb/source/Commands/CommandObjectMemory.cpp')
-rw-r--r-- | lldb/source/Commands/CommandObjectMemory.cpp | 97 |
1 files changed, 46 insertions, 51 deletions
diff --git a/lldb/source/Commands/CommandObjectMemory.cpp b/lldb/source/Commands/CommandObjectMemory.cpp index 8663389..249e3cb 100644 --- a/lldb/source/Commands/CommandObjectMemory.cpp +++ b/lldb/source/Commands/CommandObjectMemory.cpp @@ -67,28 +67,27 @@ public: { } - virtual - ~OptionGroupReadMemory () + ~OptionGroupReadMemory () override { } - virtual uint32_t - GetNumDefinitions () + uint32_t + GetNumDefinitions () override { return sizeof (g_option_table) / sizeof (OptionDefinition); } - virtual const OptionDefinition* - GetDefinitions () + const OptionDefinition* + GetDefinitions () override { return g_option_table; } - virtual Error + Error SetOptionValue (CommandInterpreter &interpreter, uint32_t option_idx, - const char *option_arg) + const char *option_arg) override { Error error; const int short_option = g_option_table[option_idx].short_option; @@ -120,8 +119,8 @@ public: return error; } - virtual void - OptionParsingStarting (CommandInterpreter &interpreter) + void + OptionParsingStarting (CommandInterpreter &interpreter) override { m_num_per_line.Clear(); m_output_as_binary = false; @@ -367,25 +366,25 @@ public: m_option_group.Finalize(); } - virtual - ~CommandObjectMemoryRead () + ~CommandObjectMemoryRead () override { } Options * - GetOptions () + GetOptions () override { return &m_option_group; } - virtual const char *GetRepeatCommand (Args ¤t_command_args, uint32_t index) + const char * + GetRepeatCommand (Args ¤t_command_args, uint32_t index) override { return m_cmd_name.c_str(); } protected: - virtual bool - DoExecute (Args& command, CommandReturnObject &result) + bool + DoExecute (Args& command, CommandReturnObject &result) override { // No need to check "target" for validity as eCommandRequiresTarget ensures it is valid Target *target = m_exe_ctx.GetTargetPtr(); @@ -966,27 +965,26 @@ public: { } - virtual - ~OptionGroupFindMemory () + ~OptionGroupFindMemory () override { } - virtual uint32_t - GetNumDefinitions () + uint32_t + GetNumDefinitions () override { return sizeof (g_memory_find_option_table) / sizeof (OptionDefinition); } - virtual const OptionDefinition* - GetDefinitions () + const OptionDefinition* + GetDefinitions () override { return g_memory_find_option_table; } - virtual Error + Error SetOptionValue (CommandInterpreter &interpreter, uint32_t option_idx, - const char *option_arg) + const char *option_arg) override { Error error; const int short_option = g_memory_find_option_table[option_idx].short_option; @@ -1018,8 +1016,8 @@ public: return error; } - virtual void - OptionParsingStarting (CommandInterpreter &interpreter) + void + OptionParsingStarting (CommandInterpreter &interpreter) override { m_expr.Clear(); m_string.Clear(); @@ -1068,20 +1066,19 @@ public: m_option_group.Finalize(); } - virtual - ~CommandObjectMemoryFind () + ~CommandObjectMemoryFind () override { } Options * - GetOptions () + GetOptions () override { return &m_option_group; } protected: - virtual bool - DoExecute (Args& command, CommandReturnObject &result) + bool + DoExecute (Args& command, CommandReturnObject &result) override { // No need to check "process" for validity as eCommandRequiresProcess ensures it is valid Process *process = m_exe_ctx.GetProcessPtr(); @@ -1258,27 +1255,26 @@ public: { } - virtual - ~OptionGroupWriteMemory () + ~OptionGroupWriteMemory () override { } - virtual uint32_t - GetNumDefinitions () + uint32_t + GetNumDefinitions () override { return sizeof (g_memory_write_option_table) / sizeof (OptionDefinition); } - virtual const OptionDefinition* - GetDefinitions () + const OptionDefinition* + GetDefinitions () override { return g_memory_write_option_table; } - virtual Error + Error SetOptionValue (CommandInterpreter &interpreter, uint32_t option_idx, - const char *option_arg) + const char *option_arg) override { Error error; const int short_option = g_memory_write_option_table[option_idx].short_option; @@ -1312,8 +1308,8 @@ public: return error; } - virtual void - OptionParsingStarting (CommandInterpreter &interpreter) + void + OptionParsingStarting (CommandInterpreter &interpreter) override { m_infile.Clear(); m_infile_offset = 0; @@ -1363,13 +1359,12 @@ public: } - virtual - ~CommandObjectMemoryWrite () + ~CommandObjectMemoryWrite () override { } Options * - GetOptions () + GetOptions () override { return &m_option_group; } @@ -1402,8 +1397,8 @@ public: } protected: - virtual bool - DoExecute (Args& command, CommandReturnObject &result) + bool + DoExecute (Args& command, CommandReturnObject &result) override { // No need to check "process" for validity as eCommandRequiresProcess ensures it is valid Process *process = m_exe_ctx.GetProcessPtr(); @@ -1711,19 +1706,19 @@ public: m_arguments.push_back (arg1); } - virtual - ~CommandObjectMemoryHistory () + ~CommandObjectMemoryHistory () override { } - virtual const char *GetRepeatCommand (Args ¤t_command_args, uint32_t index) + const char * + GetRepeatCommand (Args ¤t_command_args, uint32_t index) override { return m_cmd_name.c_str(); } protected: - virtual bool - DoExecute (Args& command, CommandReturnObject &result) + bool + DoExecute (Args& command, CommandReturnObject &result) override { const size_t argc = command.GetArgumentCount(); |