diff options
author | Eugene Zelenko <eugene.zelenko@gmail.com> | 2015-10-22 21:24:37 +0000 |
---|---|---|
committer | Eugene Zelenko <eugene.zelenko@gmail.com> | 2015-10-22 21:24:37 +0000 |
commit | 45a4014a503489e27bd7d0019873fde658be8ba0 (patch) | |
tree | 3421e0b8e3c36a707110828aff47409db17f2875 /lldb/source/Plugins/OperatingSystem/Go/OperatingSystemGo.cpp | |
parent | e2dd2fd7c733729047329b8c81e40b8e3da64df8 (diff) | |
download | bcm5719-llvm-45a4014a503489e27bd7d0019873fde658be8ba0.tar.gz bcm5719-llvm-45a4014a503489e27bd7d0019873fde658be8ba0.zip |
Fix Clang-tidy modernize-use-override warnings in include/lldb/Disassembler and OperatingSystem; other minor fixes.
Second attempt which should work for MSVC.
llvm-svn: 251066
Diffstat (limited to 'lldb/source/Plugins/OperatingSystem/Go/OperatingSystemGo.cpp')
-rw-r--r-- | lldb/source/Plugins/OperatingSystem/Go/OperatingSystemGo.cpp | 61 |
1 files changed, 30 insertions, 31 deletions
diff --git a/lldb/source/Plugins/OperatingSystem/Go/OperatingSystemGo.cpp b/lldb/source/Plugins/OperatingSystem/Go/OperatingSystemGo.cpp index 2709afc2743..86c574f2776 100644 --- a/lldb/source/Plugins/OperatingSystem/Go/OperatingSystemGo.cpp +++ b/lldb/source/Plugins/OperatingSystem/Go/OperatingSystemGo.cpp @@ -1,4 +1,4 @@ -//===-- OperatingSystemGo.cpp --------------------------------*- C++ -*-===// +//===-- OperatingSystemGo.cpp -----------------------------------*- C++ -*-===// // // The LLVM Compiler Infrastructure // @@ -6,13 +6,15 @@ // License. See LICENSE.TXT for details. // //===----------------------------------------------------------------------===// -#include "OperatingSystemGo.h" // C Includes // C++ Includes #include <unordered_map> // Other libraries and framework includes +// Project includes +#include "OperatingSystemGo.h" + #include "lldb/Core/DataBufferHeap.h" #include "lldb/Core/Debugger.h" #include "lldb/Core/Module.h" @@ -56,13 +58,7 @@ enum class PluginProperties : public Properties { - public: - static ConstString - GetSettingName() - { - return OperatingSystemGo::GetPluginNameStatic(); - } - +public: PluginProperties() : Properties() { @@ -70,7 +66,13 @@ class PluginProperties : public Properties m_collection_sp->Initialize(g_properties); } - virtual ~PluginProperties() {} + ~PluginProperties() override = default; + + static ConstString + GetSettingName() + { + return OperatingSystemGo::GetPluginNameStatic(); + } bool GetEnableGoroutines() @@ -100,10 +102,7 @@ GetGlobalPluginProperties() class RegisterContextGo : public RegisterContextMemory { - public: - //------------------------------------------------------------------ - // Constructors and Destructors - //------------------------------------------------------------------ +public: RegisterContextGo(lldb_private::Thread &thread, uint32_t concrete_frame_idx, DynamicRegisterInfo ®_info, lldb::addr_t reg_data_addr) : RegisterContextMemory(thread, concrete_frame_idx, reg_info, reg_data_addr) @@ -118,10 +117,11 @@ class RegisterContextGo : public RegisterContextMemory m_reg_data.SetData(reg_data_sp); } - virtual ~RegisterContextGo() {} + ~RegisterContextGo() override = default; - virtual bool - ReadRegister(const lldb_private::RegisterInfo *reg_info, lldb_private::RegisterValue ®_value) + bool + ReadRegister(const lldb_private::RegisterInfo *reg_info, + lldb_private::RegisterValue ®_value) override { switch (reg_info->kinds[eRegisterKindGeneric]) { @@ -134,8 +134,9 @@ class RegisterContextGo : public RegisterContextMemory } } - virtual bool - WriteRegister(const lldb_private::RegisterInfo *reg_info, const lldb_private::RegisterValue ®_value) + bool + WriteRegister(const lldb_private::RegisterInfo *reg_info, + const lldb_private::RegisterValue ®_value) override { switch (reg_info->kinds[eRegisterKindGeneric]) { @@ -147,11 +148,11 @@ class RegisterContextGo : public RegisterContextMemory } } - private: +private: DISALLOW_COPY_AND_ASSIGN(RegisterContextGo); }; -} // namespace +} // anonymous namespace struct OperatingSystemGo::Goroutine { @@ -219,6 +220,14 @@ OperatingSystemGo::CreateInstance(Process *process, bool force) return new OperatingSystemGo(process); } +OperatingSystemGo::OperatingSystemGo(lldb_private::Process *process) + : OperatingSystem(process) + , m_reginfo(new DynamicRegisterInfo) +{ +} + +OperatingSystemGo::~OperatingSystemGo() = default; + ConstString OperatingSystemGo::GetPluginNameStatic() { @@ -232,16 +241,6 @@ OperatingSystemGo::GetPluginDescriptionStatic() return "Operating system plug-in that reads runtime data-structures for goroutines."; } -OperatingSystemGo::OperatingSystemGo(lldb_private::Process *process) - : OperatingSystem(process) - , m_reginfo(new DynamicRegisterInfo) -{ -} - -OperatingSystemGo::~OperatingSystemGo() -{ -} - bool OperatingSystemGo::Init(ThreadList &threads) { |