[Lldb-commits] [lldb] r251374 - Fix Clang-tidy modernize-use-override warnings in source/Plugins/LanguageRuntime and Platform; other minor fixes.
Eugene Zelenko via lldb-commits
lldb-commits at lists.llvm.org
Mon Oct 26 17:45:07 PDT 2015
Author: eugenezelenko
Date: Mon Oct 26 19:45:06 2015
New Revision: 251374
URL: http://llvm.org/viewvc/llvm-project?rev=251374&view=rev
Log:
Fix Clang-tidy modernize-use-override warnings in source/Plugins/LanguageRuntime and Platform; other minor fixes.
Modified:
lldb/trunk/source/Plugins/LanguageRuntime/RenderScript/RenderScriptRuntime/RenderScriptRuntime.cpp
lldb/trunk/source/Plugins/LanguageRuntime/RenderScript/RenderScriptRuntime/RenderScriptRuntime.h
lldb/trunk/source/Plugins/Platform/Android/PlatformAndroid.h
lldb/trunk/source/Plugins/Platform/Android/PlatformAndroidRemoteGDBServer.h
lldb/trunk/source/Plugins/Platform/FreeBSD/PlatformFreeBSD.h
lldb/trunk/source/Plugins/Platform/Kalimba/PlatformKalimba.h
lldb/trunk/source/Plugins/Platform/Linux/PlatformLinux.cpp
lldb/trunk/source/Plugins/Platform/Linux/PlatformLinux.h
lldb/trunk/source/Plugins/Platform/MacOSX/PlatformDarwin.h
lldb/trunk/source/Plugins/Platform/MacOSX/PlatformMacOSX.h
lldb/trunk/source/Plugins/Platform/MacOSX/PlatformRemoteiOS.h
lldb/trunk/source/Plugins/Platform/MacOSX/PlatformiOSSimulator.h
lldb/trunk/source/Plugins/Platform/NetBSD/PlatformNetBSD.h
lldb/trunk/source/Plugins/Platform/POSIX/PlatformPOSIX.h
lldb/trunk/source/Plugins/Platform/Windows/PlatformWindows.cpp
lldb/trunk/source/Plugins/Platform/Windows/PlatformWindows.h
Modified: lldb/trunk/source/Plugins/LanguageRuntime/RenderScript/RenderScriptRuntime/RenderScriptRuntime.cpp
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Plugins/LanguageRuntime/RenderScript/RenderScriptRuntime/RenderScriptRuntime.cpp?rev=251374&r1=251373&r2=251374&view=diff
==============================================================================
--- lldb/trunk/source/Plugins/LanguageRuntime/RenderScript/RenderScriptRuntime/RenderScriptRuntime.cpp (original)
+++ lldb/trunk/source/Plugins/LanguageRuntime/RenderScript/RenderScriptRuntime/RenderScriptRuntime.cpp Mon Oct 26 19:45:06 2015
@@ -7,6 +7,10 @@
//
//===----------------------------------------------------------------------===//
+// C Includes
+// C++ Includes
+// Other libraries and framework includes
+// Project includes
#include "RenderScriptRuntime.h"
#include "lldb/Core/ConstString.h"
@@ -43,7 +47,7 @@ namespace {
template <typename type_t>
class empirical_type
{
- public:
+public:
// Ctor. Contents is invalid when constructed.
empirical_type()
: valid(false)
@@ -97,17 +101,17 @@ class empirical_type
return data;
}
- protected:
+protected:
bool valid;
type_t data;
};
-} // namespace {}
+} // anonymous namespace
// The ScriptDetails class collects data associated with a single script instance.
struct RenderScriptRuntime::ScriptDetails
{
- ~ScriptDetails() {};
+ ~ScriptDetails() = default;
enum ScriptType
{
@@ -226,7 +230,6 @@ struct RenderScriptRuntime::AllocationDe
AllocationDetails(): id(ID++)
{
}
-
};
unsigned int RenderScriptRuntime::AllocationDetails::ID = 1;
@@ -401,7 +404,6 @@ RenderScriptRuntime::IsRenderScriptModul
return GetModuleKind(module_sp) != eModuleKindIgnored;
}
-
void
RenderScriptRuntime::ModulesDidLoad(const ModuleList &module_list )
{
@@ -418,7 +420,6 @@ RenderScriptRuntime::ModulesDidLoad(cons
}
}
-
//------------------------------------------------------------------
// PluginInterface protocol
//------------------------------------------------------------------
@@ -468,7 +469,6 @@ RenderScriptRuntime::CreateExceptionReso
return resolver_sp;
}
-
const RenderScriptRuntime::HookDefn RenderScriptRuntime::s_runtimeHookDefns[] =
{
//rsdScript
@@ -531,8 +531,8 @@ const RenderScriptRuntime::HookDefn Rend
nullptr // handler
},
};
-const size_t RenderScriptRuntime::s_runtimeHookCount = sizeof(s_runtimeHookDefns)/sizeof(s_runtimeHookDefns[0]);
+const size_t RenderScriptRuntime::s_runtimeHookCount = sizeof(s_runtimeHookDefns)/sizeof(s_runtimeHookDefns[0]);
bool
RenderScriptRuntime::HookCallback(void *baton, StoppointCallbackContext *ctx, lldb::user_id_t break_id, lldb::user_id_t break_loc_id)
@@ -547,7 +547,6 @@ RenderScriptRuntime::HookCallback(void *
return false;
}
-
void
RenderScriptRuntime::HookCallback(RuntimeHook* hook_info, ExecutionContext& context)
{
@@ -562,7 +561,6 @@ RenderScriptRuntime::HookCallback(Runtim
}
}
-
bool
RenderScriptRuntime::GetArgSimple(ExecutionContext &context, uint32_t arg, uint64_t *data)
{
@@ -714,7 +712,6 @@ RenderScriptRuntime::GetArgSimple(Execut
}
}
-
return success;
}
@@ -868,7 +865,6 @@ RenderScriptRuntime::CaptureScriptInit1(
{
log->Printf ("RenderScriptRuntime::CaptureScriptInit1 - resource name invalid, Script not tagged");
}
-
}
void
@@ -1810,7 +1806,6 @@ RenderScriptRuntime::Update()
}
}
-
// The maximum line length of an .rs.info packet
#define MAXLINE 500
@@ -2453,8 +2448,6 @@ RenderScriptRuntime::PlaceBreakpointOnKe
if (bp)
bp->GetDescription(&strm, lldb::eDescriptionLevelInitial, false);
-
- return;
}
void
@@ -2593,8 +2586,7 @@ RSKernelDescriptor::Dump(Stream &strm) c
class CommandObjectRenderScriptRuntimeModuleProbe : public CommandObjectParsed
{
- private:
- public:
+public:
CommandObjectRenderScriptRuntimeModuleProbe(CommandInterpreter &interpreter)
: CommandObjectParsed(interpreter, "renderscript module probe",
"Initiates a Probe of all loaded modules for kernels and other renderscript objects.",
@@ -2603,10 +2595,10 @@ class CommandObjectRenderScriptRuntimeMo
{
}
- ~CommandObjectRenderScriptRuntimeModuleProbe() {}
+ ~CommandObjectRenderScriptRuntimeModuleProbe() override = default;
bool
- DoExecute(Args &command, CommandReturnObject &result)
+ DoExecute(Args &command, CommandReturnObject &result) override
{
const size_t argc = command.GetArgumentCount();
if (argc == 0)
@@ -2632,8 +2624,7 @@ class CommandObjectRenderScriptRuntimeMo
class CommandObjectRenderScriptRuntimeModuleDump : public CommandObjectParsed
{
- private:
- public:
+public:
CommandObjectRenderScriptRuntimeModuleDump(CommandInterpreter &interpreter)
: CommandObjectParsed(interpreter, "renderscript module dump",
"Dumps renderscript specific information for all modules.", "renderscript module dump",
@@ -2641,10 +2632,10 @@ class CommandObjectRenderScriptRuntimeMo
{
}
- ~CommandObjectRenderScriptRuntimeModuleDump() {}
+ ~CommandObjectRenderScriptRuntimeModuleDump() override = default;
bool
- DoExecute(Args &command, CommandReturnObject &result)
+ DoExecute(Args &command, CommandReturnObject &result) override
{
RenderScriptRuntime *runtime =
(RenderScriptRuntime *)m_exe_ctx.GetProcessPtr()->GetLanguageRuntime(eLanguageTypeExtRenderScript);
@@ -2656,8 +2647,7 @@ class CommandObjectRenderScriptRuntimeMo
class CommandObjectRenderScriptRuntimeModule : public CommandObjectMultiword
{
- private:
- public:
+public:
CommandObjectRenderScriptRuntimeModule(CommandInterpreter &interpreter)
: CommandObjectMultiword(interpreter, "renderscript module", "Commands that deal with renderscript modules.",
NULL)
@@ -2666,13 +2656,12 @@ class CommandObjectRenderScriptRuntimeMo
LoadSubCommand("dump", CommandObjectSP(new CommandObjectRenderScriptRuntimeModuleDump(interpreter)));
}
- ~CommandObjectRenderScriptRuntimeModule() {}
+ ~CommandObjectRenderScriptRuntimeModule() override = default;
};
class CommandObjectRenderScriptRuntimeKernelList : public CommandObjectParsed
{
- private:
- public:
+public:
CommandObjectRenderScriptRuntimeKernelList(CommandInterpreter &interpreter)
: CommandObjectParsed(interpreter, "renderscript kernel list",
"Lists renderscript kernel names and associated script resources.", "renderscript kernel list",
@@ -2680,10 +2669,10 @@ class CommandObjectRenderScriptRuntimeKe
{
}
- ~CommandObjectRenderScriptRuntimeKernelList() {}
+ ~CommandObjectRenderScriptRuntimeKernelList() override = default;
bool
- DoExecute(Args &command, CommandReturnObject &result)
+ DoExecute(Args &command, CommandReturnObject &result) override
{
RenderScriptRuntime *runtime =
(RenderScriptRuntime *)m_exe_ctx.GetProcessPtr()->GetLanguageRuntime(eLanguageTypeExtRenderScript);
@@ -2695,8 +2684,7 @@ class CommandObjectRenderScriptRuntimeKe
class CommandObjectRenderScriptRuntimeKernelBreakpointSet : public CommandObjectParsed
{
- private:
- public:
+public:
CommandObjectRenderScriptRuntimeKernelBreakpointSet(CommandInterpreter &interpreter)
: CommandObjectParsed(interpreter, "renderscript kernel breakpoint set",
"Sets a breakpoint on a renderscript kernel.", "renderscript kernel breakpoint set <kernel_name> [-c x,y,z]",
@@ -2704,26 +2692,25 @@ class CommandObjectRenderScriptRuntimeKe
{
}
- virtual Options*
- GetOptions()
+ ~CommandObjectRenderScriptRuntimeKernelBreakpointSet() override = default;
+
+ Options*
+ GetOptions() override
{
return &m_options;
}
class CommandOptions : public Options
{
- public:
+ public:
CommandOptions(CommandInterpreter &interpreter) : Options(interpreter)
{
}
- virtual
- ~CommandOptions()
- {
- }
+ ~CommandOptions() override = default;
- virtual Error
- SetOptionValue(uint32_t option_idx, const char *option_arg)
+ Error
+ SetOptionValue(uint32_t option_idx, const char *option_arg) override
{
Error error;
const int short_option = m_getopt_table[option_idx].val;
@@ -2769,7 +2756,7 @@ class CommandObjectRenderScriptRuntimeKe
}
void
- OptionParsingStarting()
+ OptionParsingStarting() override
{
// -1 means the -c option hasn't been set
m_coord[0] = -1;
@@ -2778,7 +2765,7 @@ class CommandObjectRenderScriptRuntimeKe
}
const OptionDefinition*
- GetDefinitions()
+ GetDefinitions() override
{
return g_option_table;
}
@@ -2787,10 +2774,8 @@ class CommandObjectRenderScriptRuntimeKe
std::array<int,3> m_coord;
};
- ~CommandObjectRenderScriptRuntimeKernelBreakpointSet() {}
-
bool
- DoExecute(Args &command, CommandReturnObject &result)
+ DoExecute(Args &command, CommandReturnObject &result) override
{
const size_t argc = command.GetArgumentCount();
if (argc < 1)
@@ -2816,10 +2801,10 @@ class CommandObjectRenderScriptRuntimeKe
result.SetStatus(eReturnStatusFailed);
result.AppendErrorWithFormat("Error: %s", error.AsCString());
return false;
- }
+ }
- private:
- CommandOptions m_options;
+private:
+ CommandOptions m_options;
};
OptionDefinition
@@ -2832,11 +2817,9 @@ CommandObjectRenderScriptRuntimeKernelBr
{ 0, false, NULL, 0, 0, NULL, NULL, 0, eArgTypeNone, NULL }
};
-
class CommandObjectRenderScriptRuntimeKernelBreakpointAll : public CommandObjectParsed
{
- private:
- public:
+public:
CommandObjectRenderScriptRuntimeKernelBreakpointAll(CommandInterpreter &interpreter)
: CommandObjectParsed(interpreter, "renderscript kernel breakpoint all",
"Automatically sets a breakpoint on all renderscript kernels that are or will be loaded.\n"
@@ -2847,10 +2830,10 @@ class CommandObjectRenderScriptRuntimeKe
{
}
- ~CommandObjectRenderScriptRuntimeKernelBreakpointAll() {}
+ ~CommandObjectRenderScriptRuntimeKernelBreakpointAll() override = default;
bool
- DoExecute(Args &command, CommandReturnObject &result)
+ DoExecute(Args &command, CommandReturnObject &result) override
{
const size_t argc = command.GetArgumentCount();
if (argc != 1)
@@ -2891,8 +2874,7 @@ class CommandObjectRenderScriptRuntimeKe
class CommandObjectRenderScriptRuntimeKernelBreakpoint : public CommandObjectMultiword
{
- private:
- public:
+public:
CommandObjectRenderScriptRuntimeKernelBreakpoint(CommandInterpreter &interpreter)
: CommandObjectMultiword(interpreter, "renderscript kernel", "Commands that generate breakpoints on renderscript kernels.",
nullptr)
@@ -2901,13 +2883,12 @@ class CommandObjectRenderScriptRuntimeKe
LoadSubCommand("all", CommandObjectSP(new CommandObjectRenderScriptRuntimeKernelBreakpointAll(interpreter)));
}
- ~CommandObjectRenderScriptRuntimeKernelBreakpoint() {}
+ ~CommandObjectRenderScriptRuntimeKernelBreakpoint() override = default;
};
class CommandObjectRenderScriptRuntimeKernel : public CommandObjectMultiword
{
- private:
- public:
+public:
CommandObjectRenderScriptRuntimeKernel(CommandInterpreter &interpreter)
: CommandObjectMultiword(interpreter, "renderscript kernel", "Commands that deal with renderscript kernels.",
NULL)
@@ -2916,13 +2897,12 @@ class CommandObjectRenderScriptRuntimeKe
LoadSubCommand("breakpoint", CommandObjectSP(new CommandObjectRenderScriptRuntimeKernelBreakpoint(interpreter)));
}
- ~CommandObjectRenderScriptRuntimeKernel() {}
+ ~CommandObjectRenderScriptRuntimeKernel() override = default;
};
class CommandObjectRenderScriptRuntimeContextDump : public CommandObjectParsed
{
- private:
- public:
+public:
CommandObjectRenderScriptRuntimeContextDump(CommandInterpreter &interpreter)
: CommandObjectParsed(interpreter, "renderscript context dump",
"Dumps renderscript context information.", "renderscript context dump",
@@ -2930,10 +2910,10 @@ class CommandObjectRenderScriptRuntimeCo
{
}
- ~CommandObjectRenderScriptRuntimeContextDump() {}
+ ~CommandObjectRenderScriptRuntimeContextDump() override = default;
bool
- DoExecute(Args &command, CommandReturnObject &result)
+ DoExecute(Args &command, CommandReturnObject &result) override
{
RenderScriptRuntime *runtime =
(RenderScriptRuntime *)m_exe_ctx.GetProcessPtr()->GetLanguageRuntime(eLanguageTypeExtRenderScript);
@@ -2945,8 +2925,7 @@ class CommandObjectRenderScriptRuntimeCo
class CommandObjectRenderScriptRuntimeContext : public CommandObjectMultiword
{
- private:
- public:
+public:
CommandObjectRenderScriptRuntimeContext(CommandInterpreter &interpreter)
: CommandObjectMultiword(interpreter, "renderscript context", "Commands that deal with renderscript contexts.",
NULL)
@@ -2954,14 +2933,12 @@ class CommandObjectRenderScriptRuntimeCo
LoadSubCommand("dump", CommandObjectSP(new CommandObjectRenderScriptRuntimeContextDump(interpreter)));
}
- ~CommandObjectRenderScriptRuntimeContext() {}
+ ~CommandObjectRenderScriptRuntimeContext() override = default;
};
-
class CommandObjectRenderScriptRuntimeAllocationDump : public CommandObjectParsed
{
- private:
- public:
+public:
CommandObjectRenderScriptRuntimeAllocationDump(CommandInterpreter &interpreter)
: CommandObjectParsed(interpreter, "renderscript allocation dump",
"Displays the contents of a particular allocation", "renderscript allocation dump <ID>",
@@ -2969,26 +2946,25 @@ class CommandObjectRenderScriptRuntimeAl
{
}
- virtual Options*
- GetOptions()
+ ~CommandObjectRenderScriptRuntimeAllocationDump() override = default;
+
+ Options*
+ GetOptions() override
{
return &m_options;
}
class CommandOptions : public Options
{
- public:
+ public:
CommandOptions(CommandInterpreter &interpreter) : Options(interpreter)
{
}
- virtual
- ~CommandOptions()
- {
- }
+ ~CommandOptions() override = default;
- virtual Error
- SetOptionValue(uint32_t option_idx, const char *option_arg)
+ Error
+ SetOptionValue(uint32_t option_idx, const char *option_arg) override
{
Error error;
const int short_option = m_getopt_table[option_idx].val;
@@ -3011,13 +2987,13 @@ class CommandObjectRenderScriptRuntimeAl
}
void
- OptionParsingStarting()
+ OptionParsingStarting() override
{
m_outfile.Clear();
}
const OptionDefinition*
- GetDefinitions()
+ GetDefinitions() override
{
return g_option_table;
}
@@ -3026,10 +3002,8 @@ class CommandObjectRenderScriptRuntimeAl
FileSpec m_outfile;
};
- ~CommandObjectRenderScriptRuntimeAllocationDump() {}
-
bool
- DoExecute(Args &command, CommandReturnObject &result)
+ DoExecute(Args &command, CommandReturnObject &result) override
{
const size_t argc = command.GetArgumentCount();
if (argc < 1)
@@ -3088,8 +3062,8 @@ class CommandObjectRenderScriptRuntimeAl
return true;
}
- private:
- CommandOptions m_options;
+private:
+ CommandOptions m_options;
};
OptionDefinition
@@ -3100,10 +3074,9 @@ CommandObjectRenderScriptRuntimeAllocati
{ 0, false, NULL, 0, 0, NULL, NULL, 0, eArgTypeNone, NULL }
};
-
class CommandObjectRenderScriptRuntimeAllocationList : public CommandObjectParsed
{
- public:
+public:
CommandObjectRenderScriptRuntimeAllocationList(CommandInterpreter &interpreter)
: CommandObjectParsed(interpreter, "renderscript allocation list",
"List renderscript allocations and their information.", "renderscript allocation list",
@@ -3111,26 +3084,25 @@ class CommandObjectRenderScriptRuntimeAl
{
}
- virtual Options*
- GetOptions()
+ ~CommandObjectRenderScriptRuntimeAllocationList() override = default;
+
+ Options*
+ GetOptions() override
{
return &m_options;
}
class CommandOptions : public Options
{
- public:
+ public:
CommandOptions(CommandInterpreter &interpreter) : Options(interpreter), m_refresh(false)
{
}
- virtual
- ~CommandOptions()
- {
- }
+ ~CommandOptions() override = default;
- virtual Error
- SetOptionValue(uint32_t option_idx, const char *option_arg)
+ Error
+ SetOptionValue(uint32_t option_idx, const char *option_arg) override
{
Error error;
const int short_option = m_getopt_table[option_idx].val;
@@ -3148,13 +3120,13 @@ class CommandObjectRenderScriptRuntimeAl
}
void
- OptionParsingStarting()
+ OptionParsingStarting() override
{
m_refresh = false;
}
const OptionDefinition*
- GetDefinitions()
+ GetDefinitions() override
{
return g_option_table;
}
@@ -3163,10 +3135,8 @@ class CommandObjectRenderScriptRuntimeAl
bool m_refresh;
};
- ~CommandObjectRenderScriptRuntimeAllocationList() {}
-
bool
- DoExecute(Args &command, CommandReturnObject &result)
+ DoExecute(Args &command, CommandReturnObject &result) override
{
RenderScriptRuntime *runtime =
static_cast<RenderScriptRuntime *>(m_exe_ctx.GetProcessPtr()->GetLanguageRuntime(eLanguageTypeExtRenderScript));
@@ -3175,7 +3145,7 @@ class CommandObjectRenderScriptRuntimeAl
return true;
}
- private:
+private:
CommandOptions m_options;
};
@@ -3187,11 +3157,9 @@ CommandObjectRenderScriptRuntimeAllocati
{ 0, false, NULL, 0, 0, NULL, NULL, 0, eArgTypeNone, NULL }
};
-
class CommandObjectRenderScriptRuntimeAllocationLoad : public CommandObjectParsed
{
- private:
- public:
+public:
CommandObjectRenderScriptRuntimeAllocationLoad(CommandInterpreter &interpreter)
: CommandObjectParsed(interpreter, "renderscript allocation load",
"Loads renderscript allocation contents from a file.", "renderscript allocation load <ID> <filename>",
@@ -3199,10 +3167,10 @@ class CommandObjectRenderScriptRuntimeAl
{
}
- ~CommandObjectRenderScriptRuntimeAllocationLoad() {}
+ ~CommandObjectRenderScriptRuntimeAllocationLoad() override = default;
bool
- DoExecute(Args &command, CommandReturnObject &result)
+ DoExecute(Args &command, CommandReturnObject &result) override
{
const size_t argc = command.GetArgumentCount();
if (argc != 2)
@@ -3237,11 +3205,9 @@ class CommandObjectRenderScriptRuntimeAl
}
};
-
class CommandObjectRenderScriptRuntimeAllocationSave : public CommandObjectParsed
{
- private:
- public:
+public:
CommandObjectRenderScriptRuntimeAllocationSave(CommandInterpreter &interpreter)
: CommandObjectParsed(interpreter, "renderscript allocation save",
"Write renderscript allocation contents to a file.", "renderscript allocation save <ID> <filename>",
@@ -3249,10 +3215,10 @@ class CommandObjectRenderScriptRuntimeAl
{
}
- ~CommandObjectRenderScriptRuntimeAllocationSave() {}
+ ~CommandObjectRenderScriptRuntimeAllocationSave() override = default;
bool
- DoExecute(Args &command, CommandReturnObject &result)
+ DoExecute(Args &command, CommandReturnObject &result) override
{
const size_t argc = command.GetArgumentCount();
if (argc != 2)
@@ -3289,8 +3255,7 @@ class CommandObjectRenderScriptRuntimeAl
class CommandObjectRenderScriptRuntimeAllocation : public CommandObjectMultiword
{
- private:
- public:
+public:
CommandObjectRenderScriptRuntimeAllocation(CommandInterpreter &interpreter)
: CommandObjectMultiword(interpreter, "renderscript allocation", "Commands that deal with renderscript allocations.",
NULL)
@@ -3301,14 +3266,12 @@ class CommandObjectRenderScriptRuntimeAl
LoadSubCommand("load", CommandObjectSP(new CommandObjectRenderScriptRuntimeAllocationLoad(interpreter)));
}
- ~CommandObjectRenderScriptRuntimeAllocation() {}
+ ~CommandObjectRenderScriptRuntimeAllocation() override = default;
};
-
class CommandObjectRenderScriptRuntimeStatus : public CommandObjectParsed
{
- private:
- public:
+public:
CommandObjectRenderScriptRuntimeStatus(CommandInterpreter &interpreter)
: CommandObjectParsed(interpreter, "renderscript status",
"Displays current renderscript runtime status.", "renderscript status",
@@ -3316,10 +3279,10 @@ class CommandObjectRenderScriptRuntimeSt
{
}
- ~CommandObjectRenderScriptRuntimeStatus() {}
+ ~CommandObjectRenderScriptRuntimeStatus() override = default;
bool
- DoExecute(Args &command, CommandReturnObject &result)
+ DoExecute(Args &command, CommandReturnObject &result) override
{
RenderScriptRuntime *runtime =
(RenderScriptRuntime *)m_exe_ctx.GetProcessPtr()->GetLanguageRuntime(eLanguageTypeExtRenderScript);
@@ -3331,7 +3294,7 @@ class CommandObjectRenderScriptRuntimeSt
class CommandObjectRenderScriptRuntime : public CommandObjectMultiword
{
- public:
+public:
CommandObjectRenderScriptRuntime(CommandInterpreter &interpreter)
: CommandObjectMultiword(interpreter, "renderscript", "A set of commands for operating on renderscript.",
"renderscript <subcommand> [<subcommand-options>]")
@@ -3343,7 +3306,7 @@ class CommandObjectRenderScriptRuntime :
LoadSubCommand("allocation", CommandObjectSP(new CommandObjectRenderScriptRuntimeAllocation(interpreter)));
}
- ~CommandObjectRenderScriptRuntime() {}
+ ~CommandObjectRenderScriptRuntime() override = default;
};
void
Modified: lldb/trunk/source/Plugins/LanguageRuntime/RenderScript/RenderScriptRuntime/RenderScriptRuntime.h
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Plugins/LanguageRuntime/RenderScript/RenderScriptRuntime/RenderScriptRuntime.h?rev=251374&r1=251373&r2=251374&view=diff
==============================================================================
--- lldb/trunk/source/Plugins/LanguageRuntime/RenderScript/RenderScriptRuntime/RenderScriptRuntime.h (original)
+++ lldb/trunk/source/Plugins/LanguageRuntime/RenderScript/RenderScriptRuntime/RenderScriptRuntime.h Mon Oct 26 19:45:06 2015
@@ -12,6 +12,12 @@
// C Includes
// C++ Includes
+#include <array>
+#include <map>
+#include <memory>
+#include <string>
+#include <vector>
+
// Other libraries and framework includes
// Project includes
#include "lldb/lldb-private.h"
@@ -19,12 +25,8 @@
#include "lldb/Target/CPPLanguageRuntime.h"
#include "lldb/Core/Module.h"
-#include <array>
-namespace lldb_private
-{
-
-namespace lldb_renderscript
-{
+namespace lldb_private {
+namespace lldb_renderscript {
typedef uint32_t RSSlot;
class RSModuleDescriptor;
@@ -40,8 +42,7 @@ typedef std::shared_ptr<RSKernelDescript
// As well as check for .expand kernels as a fallback.
class RSBreakpointResolver : public BreakpointResolver
{
- public:
-
+public:
RSBreakpointResolver(Breakpoint *bkpt, ConstString name):
BreakpointResolver (bkpt, BreakpointResolver::NameResolver),
m_kernel_name(name)
@@ -79,13 +80,13 @@ class RSBreakpointResolver : public Brea
return ret_sp;
}
- protected:
+protected:
ConstString m_kernel_name;
};
struct RSKernelDescriptor
{
- public:
+public:
RSKernelDescriptor(const RSModuleDescriptor *module, const char *name, uint32_t slot)
: m_module(module)
, m_name(name)
@@ -102,7 +103,7 @@ struct RSKernelDescriptor
struct RSGlobalDescriptor
{
- public:
+public:
RSGlobalDescriptor(const RSModuleDescriptor *module, const char *name )
: m_module(module)
, m_name(name)
@@ -117,13 +118,13 @@ struct RSGlobalDescriptor
class RSModuleDescriptor
{
- public:
+public:
RSModuleDescriptor(const lldb::ModuleSP &module)
: m_module(module)
{
}
- ~RSModuleDescriptor() {}
+ ~RSModuleDescriptor() = default;
bool ParseRSInfo();
@@ -136,12 +137,11 @@ class RSModuleDescriptor
std::string m_resname;
};
-} // end lldb_renderscript namespace
+} // namespace lldb_renderscript
class RenderScriptRuntime : public lldb_private::CPPLanguageRuntime
{
- public:
-
+public:
enum ModuleKind
{
eModuleKindIgnored,
@@ -151,7 +151,7 @@ class RenderScriptRuntime : public lldb_
eModuleKindKernelObj
};
- ~RenderScriptRuntime();
+ ~RenderScriptRuntime() override;
//------------------------------------------------------------------
// Static Functions
@@ -172,26 +172,19 @@ class RenderScriptRuntime : public lldb_
static void ModulesDidLoad(const lldb::ProcessSP& process_sp, const ModuleList &module_list );
- //------------------------------------------------------------------
- // PluginInterface protocol
- //------------------------------------------------------------------
- virtual lldb_private::ConstString GetPluginName();
-
- virtual uint32_t GetPluginVersion();
-
- virtual bool IsVTableName(const char *name);
+ bool IsVTableName(const char *name) override;
- virtual bool GetDynamicTypeAndAddress(ValueObject &in_value, lldb::DynamicValueType use_dynamic,
- TypeAndOrName &class_type_or_name, Address &address,
- Value::ValueType &value_type);
+ bool GetDynamicTypeAndAddress(ValueObject &in_value, lldb::DynamicValueType use_dynamic,
+ TypeAndOrName &class_type_or_name, Address &address,
+ Value::ValueType &value_type) override;
- virtual TypeAndOrName
- FixUpDynamicType (const TypeAndOrName& type_and_or_name,
- ValueObject& static_value);
+ TypeAndOrName
+ FixUpDynamicType(const TypeAndOrName& type_and_or_name,
+ ValueObject& static_value) override;
- virtual bool CouldHaveDynamicValue(ValueObject &in_value);
+ bool CouldHaveDynamicValue(ValueObject &in_value) override;
- virtual lldb::BreakpointResolverSP CreateExceptionResolver(Breakpoint *bkpt, bool catch_bp, bool throw_bp);
+ lldb::BreakpointResolverSP CreateExceptionResolver(Breakpoint *bkpt, bool catch_bp, bool throw_bp) override;
bool LoadModule(const lldb::ModuleSP &module_sp);
@@ -214,11 +207,11 @@ class RenderScriptRuntime : public lldb_
void Status(Stream &strm) const;
- virtual size_t GetAlternateManglings(const ConstString &mangled, std::vector<ConstString> &alternates) {
+ size_t GetAlternateManglings(const ConstString &mangled, std::vector<ConstString> &alternates) override {
return static_cast<size_t>(0);
}
- virtual void ModulesDidLoad(const ModuleList &module_list );
+ void ModulesDidLoad(const ModuleList &module_list) override;
bool LoadAllocation(Stream &strm, const uint32_t alloc_id, const char* filename, StackFrame* frame_ptr);
@@ -228,8 +221,14 @@ class RenderScriptRuntime : public lldb_
void Initiate();
- protected:
+ //------------------------------------------------------------------
+ // PluginInterface protocol
+ //------------------------------------------------------------------
+ lldb_private::ConstString GetPluginName() override;
+
+ uint32_t GetPluginVersion() override;
+protected:
struct ScriptDetails;
struct AllocationDetails;
@@ -293,7 +292,7 @@ class RenderScriptRuntime : public lldb_
static const HookDefn s_runtimeHookDefns[];
static const size_t s_runtimeHookCount;
- private:
+private:
RenderScriptRuntime(Process *process); // Call CreateInstance instead.
static bool HookCallback(void *baton, StoppointCallbackContext *ctx, lldb::user_id_t break_id,
Modified: lldb/trunk/source/Plugins/Platform/Android/PlatformAndroid.h
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Plugins/Platform/Android/PlatformAndroid.h?rev=251374&r1=251373&r2=251374&view=diff
==============================================================================
--- lldb/trunk/source/Plugins/Platform/Android/PlatformAndroid.h (original)
+++ lldb/trunk/source/Plugins/Platform/Android/PlatformAndroid.h Mon Oct 26 19:45:06 2015
@@ -12,7 +12,6 @@
// C Includes
// C++ Includes
-
#include <string>
// Other libraries and framework includes
@@ -25,17 +24,16 @@ namespace platform_android {
class PlatformAndroid : public platform_linux::PlatformLinux
{
public:
+ PlatformAndroid(bool is_host);
+
+ ~PlatformAndroid() override;
+
static void
Initialize ();
static void
Terminate ();
- PlatformAndroid (bool is_host);
-
- virtual
- ~PlatformAndroid();
-
//------------------------------------------------------------
// lldb_private::PluginInterface functions
//------------------------------------------------------------
@@ -110,4 +108,4 @@ namespace platform_android {
} // namespace platofor_android
} // namespace lldb_private
-#endif // liblldb_PlatformAndroid_h_
+#endif // liblldb_PlatformAndroid_h_
Modified: lldb/trunk/source/Plugins/Platform/Android/PlatformAndroidRemoteGDBServer.h
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Plugins/Platform/Android/PlatformAndroidRemoteGDBServer.h?rev=251374&r1=251373&r2=251374&view=diff
==============================================================================
--- lldb/trunk/source/Plugins/Platform/Android/PlatformAndroidRemoteGDBServer.h (original)
+++ lldb/trunk/source/Plugins/Platform/Android/PlatformAndroidRemoteGDBServer.h Mon Oct 26 19:45:06 2015
@@ -25,10 +25,9 @@ namespace platform_android {
class PlatformAndroidRemoteGDBServer : public platform_gdb_server::PlatformRemoteGDBServer
{
public:
- PlatformAndroidRemoteGDBServer ();
+ PlatformAndroidRemoteGDBServer();
- virtual
- ~PlatformAndroidRemoteGDBServer ();
+ ~PlatformAndroidRemoteGDBServer() override;
Error
ConnectRemote (Args& args) override;
@@ -57,10 +56,9 @@ protected:
private:
DISALLOW_COPY_AND_ASSIGN (PlatformAndroidRemoteGDBServer);
-
};
} // namespace platform_android
} // namespace lldb_private
-#endif // liblldb_PlatformAndroidRemoteGDBServer_h_
+#endif // liblldb_PlatformAndroidRemoteGDBServer_h_
Modified: lldb/trunk/source/Plugins/Platform/FreeBSD/PlatformFreeBSD.h
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Plugins/Platform/FreeBSD/PlatformFreeBSD.h?rev=251374&r1=251373&r2=251374&view=diff
==============================================================================
--- lldb/trunk/source/Plugins/Platform/FreeBSD/PlatformFreeBSD.h (original)
+++ lldb/trunk/source/Plugins/Platform/FreeBSD/PlatformFreeBSD.h Mon Oct 26 19:45:06 2015
@@ -22,6 +22,9 @@ namespace platform_freebsd {
class PlatformFreeBSD : public Platform
{
public:
+ PlatformFreeBSD(bool is_host);
+
+ ~PlatformFreeBSD() override;
//------------------------------------------------------------
// Class functions
@@ -42,14 +45,6 @@ namespace platform_freebsd {
GetDescriptionStatic (bool is_host);
//------------------------------------------------------------
- // Class Methods
- //------------------------------------------------------------
- PlatformFreeBSD (bool is_host);
-
- virtual
- ~PlatformFreeBSD();
-
- //------------------------------------------------------------
// lldb_private::PluginInterface functions
//------------------------------------------------------------
ConstString
@@ -179,4 +174,4 @@ namespace platform_freebsd {
} // namespace platform_freebsd
} // namespace lldb_private
-#endif // liblldb_PlatformFreeBSD_h_
+#endif // liblldb_PlatformFreeBSD_h_
Modified: lldb/trunk/source/Plugins/Platform/Kalimba/PlatformKalimba.h
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Plugins/Platform/Kalimba/PlatformKalimba.h?rev=251374&r1=251373&r2=251374&view=diff
==============================================================================
--- lldb/trunk/source/Plugins/Platform/Kalimba/PlatformKalimba.h (original)
+++ lldb/trunk/source/Plugins/Platform/Kalimba/PlatformKalimba.h Mon Oct 26 19:45:06 2015
@@ -1,4 +1,4 @@
-//===-- PlatformKalimba.h -----------------------------------------*- C++ -*-===//
+//===-- PlatformKalimba.h ---------------------------------------*- C++ -*-===//
//
// The LLVM Compiler Infrastructure
//
@@ -21,6 +21,9 @@ namespace lldb_private {
class PlatformKalimba : public Platform
{
public:
+ PlatformKalimba(bool is_host);
+
+ ~PlatformKalimba() override;
static void
Initialize ();
@@ -28,11 +31,6 @@ namespace lldb_private {
static void
Terminate ();
- PlatformKalimba (bool is_host);
-
- virtual
- ~PlatformKalimba();
-
//------------------------------------------------------------
// lldb_private::PluginInterface functions
//------------------------------------------------------------
@@ -95,6 +93,7 @@ namespace lldb_private {
private:
DISALLOW_COPY_AND_ASSIGN (PlatformKalimba);
};
+
} // namespace lldb_private
-#endif // liblldb_PlatformKalimba_h_
+#endif // liblldb_PlatformKalimba_h_
Modified: lldb/trunk/source/Plugins/Platform/Linux/PlatformLinux.cpp
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Plugins/Platform/Linux/PlatformLinux.cpp?rev=251374&r1=251373&r2=251374&view=diff
==============================================================================
--- lldb/trunk/source/Plugins/Platform/Linux/PlatformLinux.cpp (original)
+++ lldb/trunk/source/Plugins/Platform/Linux/PlatformLinux.cpp Mon Oct 26 19:45:06 2015
@@ -56,13 +56,12 @@ namespace
class PlatformLinuxProperties : public Properties
{
public:
- static ConstString&
- GetSettingName ();
-
PlatformLinuxProperties();
- virtual
- ~PlatformLinuxProperties() = default;
+ ~PlatformLinuxProperties() override = default;
+
+ static ConstString&
+ GetSettingName ();
private:
static const PropertyDefinition*
@@ -121,7 +120,6 @@ PlatformLinux::DebuggerInitialize (Debug
}
}
-
//------------------------------------------------------------------
PlatformSP
@@ -177,7 +175,6 @@ PlatformLinux::CreateInstance (bool forc
return PlatformSP();
}
-
ConstString
PlatformLinux::GetPluginNameStatic (bool is_host)
{
@@ -393,7 +390,6 @@ PlatformLinux::GetFileWithUUID (const Fi
return Error();
}
-
//------------------------------------------------------------------
/// Default Constructor
//------------------------------------------------------------------
@@ -408,9 +404,7 @@ PlatformLinux::PlatformLinux (bool is_ho
/// The destructor is virtual since this class is designed to be
/// inherited from by the plug-in instance.
//------------------------------------------------------------------
-PlatformLinux::~PlatformLinux()
-{
-}
+PlatformLinux::~PlatformLinux() = default;
bool
PlatformLinux::GetProcessInfo (lldb::pid_t pid, ProcessInstanceInfo &process_info)
Modified: lldb/trunk/source/Plugins/Platform/Linux/PlatformLinux.h
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Plugins/Platform/Linux/PlatformLinux.h?rev=251374&r1=251373&r2=251374&view=diff
==============================================================================
--- lldb/trunk/source/Plugins/Platform/Linux/PlatformLinux.h (original)
+++ lldb/trunk/source/Plugins/Platform/Linux/PlatformLinux.h Mon Oct 26 19:45:06 2015
@@ -22,6 +22,9 @@ namespace platform_linux {
class PlatformLinux : public PlatformPOSIX
{
public:
+ PlatformLinux(bool is_host);
+
+ ~PlatformLinux() override;
static void
DebuggerInitialize (Debugger &debugger);
@@ -32,11 +35,6 @@ namespace platform_linux {
static void
Terminate ();
- PlatformLinux (bool is_host);
-
- virtual
- ~PlatformLinux();
-
//------------------------------------------------------------
// lldb_private::PluginInterface functions
//------------------------------------------------------------
@@ -121,4 +119,4 @@ namespace platform_linux {
} // namespace platform_linux
} // namespace lldb_private
-#endif // liblldb_PlatformLinux_h_
+#endif // liblldb_PlatformLinux_h_
Modified: lldb/trunk/source/Plugins/Platform/MacOSX/PlatformDarwin.h
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Plugins/Platform/MacOSX/PlatformDarwin.h?rev=251374&r1=251373&r2=251374&view=diff
==============================================================================
--- lldb/trunk/source/Plugins/Platform/MacOSX/PlatformDarwin.h (original)
+++ lldb/trunk/source/Plugins/Platform/MacOSX/PlatformDarwin.h Mon Oct 26 19:45:06 2015
@@ -12,6 +12,8 @@
// C Includes
// C++ Includes
+#include <string>
+
// Other libraries and framework includes
// Project includes
#include "lldb/Host/FileSpec.h"
@@ -20,11 +22,10 @@
class PlatformDarwin : public PlatformPOSIX
{
public:
- PlatformDarwin (bool is_host);
+ PlatformDarwin(bool is_host);
+
+ ~PlatformDarwin() override;
- virtual
- ~PlatformDarwin();
-
//------------------------------------------------------------
// lldb_private::Platform functions
//------------------------------------------------------------
@@ -92,7 +93,6 @@ public:
LocateExecutable (const char *basename) override;
protected:
-
void
ReadLibdispatchOffsetsAddress (lldb_private::Process *process);
@@ -105,8 +105,7 @@ protected:
const lldb_private::FileSpecList *module_search_paths_ptr,
lldb::ModuleSP *old_module_sp_ptr,
bool *did_create_ptr);
-
-
+
enum class SDKType {
MacOSX = 0,
iPhoneSimulator,
@@ -146,7 +145,6 @@ protected:
private:
DISALLOW_COPY_AND_ASSIGN (PlatformDarwin);
-
};
-#endif // liblldb_PlatformDarwin_h_
+#endif // liblldb_PlatformDarwin_h_
Modified: lldb/trunk/source/Plugins/Platform/MacOSX/PlatformMacOSX.h
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Plugins/Platform/MacOSX/PlatformMacOSX.h?rev=251374&r1=251373&r2=251374&view=diff
==============================================================================
--- lldb/trunk/source/Plugins/Platform/MacOSX/PlatformMacOSX.h (original)
+++ lldb/trunk/source/Plugins/Platform/MacOSX/PlatformMacOSX.h Mon Oct 26 19:45:06 2015
@@ -19,6 +19,9 @@
class PlatformMacOSX : public PlatformDarwin
{
public:
+ PlatformMacOSX(bool is_host);
+
+ ~PlatformMacOSX() override;
//------------------------------------------------------------
// Class functions
@@ -39,14 +42,6 @@ public:
GetDescriptionStatic(bool is_host);
//------------------------------------------------------------
- // Class Methods
- //------------------------------------------------------------
- PlatformMacOSX (bool is_host);
-
- virtual
- ~PlatformMacOSX();
-
- //------------------------------------------------------------
// lldb_private::PluginInterface functions
//------------------------------------------------------------
lldb_private::ConstString
@@ -104,7 +99,6 @@ public:
private:
DISALLOW_COPY_AND_ASSIGN (PlatformMacOSX);
-
};
-#endif // liblldb_PlatformMacOSX_h_
+#endif // liblldb_PlatformMacOSX_h_
Modified: lldb/trunk/source/Plugins/Platform/MacOSX/PlatformRemoteiOS.h
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Plugins/Platform/MacOSX/PlatformRemoteiOS.h?rev=251374&r1=251373&r2=251374&view=diff
==============================================================================
--- lldb/trunk/source/Plugins/Platform/MacOSX/PlatformRemoteiOS.h (original)
+++ lldb/trunk/source/Plugins/Platform/MacOSX/PlatformRemoteiOS.h Mon Oct 26 19:45:06 2015
@@ -1,4 +1,4 @@
-//===-- PlatformRemoteiOS.h ----------------------------------------*- C++ -*-===//
+//===-- PlatformRemoteiOS.h -------------------------------------*- C++ -*-===//
//
// The LLVM Compiler Infrastructure
//
@@ -12,15 +12,19 @@
// C Includes
// C++ Includes
-// Other libraries and framework includes
-#include "lldb/Host/FileSpec.h"
+#include <string>
+// Other libraries and framework includes
// Project includes
+#include "lldb/Host/FileSpec.h"
#include "PlatformDarwin.h"
class PlatformRemoteiOS : public PlatformDarwin
{
public:
+ PlatformRemoteiOS ();
+
+ ~PlatformRemoteiOS() override;
//------------------------------------------------------------
// Class Functions
@@ -41,14 +45,6 @@ public:
GetDescriptionStatic();
//------------------------------------------------------------
- // Class Methods
- //------------------------------------------------------------
- PlatformRemoteiOS ();
-
- virtual
- ~PlatformRemoteiOS();
-
- //------------------------------------------------------------
// lldb_private::PluginInterface functions
//------------------------------------------------------------
lldb_private::ConstString
@@ -114,7 +110,9 @@ protected:
uint32_t version_update;
bool user_cached;
};
+
typedef std::vector<SDKDirectoryInfo> SDKDirectoryInfoCollection;
+
SDKDirectoryInfoCollection m_sdk_directory_infos;
std::string m_device_support_directory;
std::string m_device_support_directory_for_os_version;
@@ -170,7 +168,6 @@ protected:
private:
DISALLOW_COPY_AND_ASSIGN (PlatformRemoteiOS);
-
};
-#endif // liblldb_PlatformRemoteiOS_h_
+#endif // liblldb_PlatformRemoteiOS_h_
Modified: lldb/trunk/source/Plugins/Platform/MacOSX/PlatformiOSSimulator.h
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Plugins/Platform/MacOSX/PlatformiOSSimulator.h?rev=251374&r1=251373&r2=251374&view=diff
==============================================================================
--- lldb/trunk/source/Plugins/Platform/MacOSX/PlatformiOSSimulator.h (original)
+++ lldb/trunk/source/Plugins/Platform/MacOSX/PlatformiOSSimulator.h Mon Oct 26 19:45:06 2015
@@ -12,6 +12,8 @@
// C Includes
// C++ Includes
+#include <string>
+
// Other libraries and framework includes
// Project includes
#include "PlatformDarwin.h"
@@ -19,6 +21,9 @@
class PlatformiOSSimulator : public PlatformDarwin
{
public:
+ PlatformiOSSimulator ();
+
+ ~PlatformiOSSimulator() override;
//------------------------------------------------------------
// Class Functions
@@ -39,14 +44,6 @@ public:
GetDescriptionStatic();
//------------------------------------------------------------
- // Class Methods
- //------------------------------------------------------------
- PlatformiOSSimulator ();
-
- virtual
- ~PlatformiOSSimulator();
-
- //------------------------------------------------------------
// lldb_private::PluginInterface functions
//------------------------------------------------------------
lldb_private::ConstString
@@ -115,7 +112,6 @@ protected:
private:
DISALLOW_COPY_AND_ASSIGN (PlatformiOSSimulator);
-
};
-#endif // liblldb_PlatformiOSSimulator_h_
+#endif // liblldb_PlatformiOSSimulator_h_
Modified: lldb/trunk/source/Plugins/Platform/NetBSD/PlatformNetBSD.h
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Plugins/Platform/NetBSD/PlatformNetBSD.h?rev=251374&r1=251373&r2=251374&view=diff
==============================================================================
--- lldb/trunk/source/Plugins/Platform/NetBSD/PlatformNetBSD.h (original)
+++ lldb/trunk/source/Plugins/Platform/NetBSD/PlatformNetBSD.h Mon Oct 26 19:45:06 2015
@@ -1,4 +1,4 @@
-//===-- PlatformNetBSD.h ---------------------------------------*- C++ -*-===//
+//===-- PlatformNetBSD.h ----------------------------------------*- C++ -*-===//
//
// The LLVM Compiler Infrastructure
//
@@ -22,6 +22,9 @@ namespace platform_netbsd {
class PlatformNetBSD : public Platform
{
public:
+ PlatformNetBSD (bool is_host);
+
+ ~PlatformNetBSD() override = default;
//------------------------------------------------------------
// Class functions
@@ -42,14 +45,6 @@ namespace platform_netbsd {
GetDescriptionStatic (bool is_host);
//------------------------------------------------------------
- // Class Methods
- //------------------------------------------------------------
- PlatformNetBSD (bool is_host);
-
- virtual
- ~PlatformNetBSD() override = default;
-
- //------------------------------------------------------------
// lldb_private::PluginInterface functions
//------------------------------------------------------------
ConstString
@@ -179,4 +174,4 @@ namespace platform_netbsd {
} // namespace platform_netbsd
} // namespace lldb_private
-#endif // liblldb_PlatformNetBSD_h_
+#endif // liblldb_PlatformNetBSD_h_
Modified: lldb/trunk/source/Plugins/Platform/POSIX/PlatformPOSIX.h
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Plugins/Platform/POSIX/PlatformPOSIX.h?rev=251374&r1=251373&r2=251374&view=diff
==============================================================================
--- lldb/trunk/source/Plugins/Platform/POSIX/PlatformPOSIX.h (original)
+++ lldb/trunk/source/Plugins/Platform/POSIX/PlatformPOSIX.h Mon Oct 26 19:45:06 2015
@@ -12,7 +12,6 @@
// C Includes
// C++ Includes
-
#include <memory>
// Other libraries and framework includes
@@ -23,11 +22,10 @@
class PlatformPOSIX : public lldb_private::Platform
{
public:
- PlatformPOSIX (bool is_host);
-
- virtual
- ~PlatformPOSIX();
-
+ PlatformPOSIX(bool is_host);
+
+ ~PlatformPOSIX() override;
+
//------------------------------------------------------------
// lldb_private::Platform functions
//------------------------------------------------------------
@@ -37,9 +35,8 @@ public:
const lldb_private::ArchSpec& arch,
lldb_private::ModuleSpec &module_spec) override;
- lldb_private::OptionGroupOptions
- *GetConnectionOptions(
- lldb_private::CommandInterpreter &interpreter) override;
+ lldb_private::OptionGroupOptions*
+ GetConnectionOptions(lldb_private::CommandInterpreter &interpreter) override;
const char *
GetHostname () override;
@@ -119,11 +116,11 @@ public:
IsConnected () const override;
lldb_private::Error
- RunShellCommand(const char *command, // Shouldn't be NULL
+ RunShellCommand(const char *command, // Shouldn't be nullptr
const lldb_private::FileSpec &working_dir, // Pass empty FileSpec to use the current working directory
- int *status_ptr, // Pass NULL if you don't want the process exit status
- int *signo_ptr, // Pass NULL if you don't want the signal that caused the process to exit
- std::string *command_output, // Pass NULL if you don't want the command output
+ int *status_ptr, // Pass nullptr if you don't want the process exit status
+ int *signo_ptr, // Pass nullptr if you don't want the signal that caused the process to exit
+ std::string *command_output, // Pass nullptr if you don't want the command output
uint32_t timeout_sec) override; // Timeout in seconds to wait for shell program to finish
lldb_private::Error
@@ -150,13 +147,13 @@ public:
lldb::ProcessSP
Attach (lldb_private::ProcessAttachInfo &attach_info,
lldb_private::Debugger &debugger,
- lldb_private::Target *target, // Can be NULL, if NULL create a new target, else use existing one
+ lldb_private::Target *target, // Can be nullptr, if nullptr create a new target, else use existing one
lldb_private::Error &error) override;
lldb::ProcessSP
DebugProcess (lldb_private::ProcessLaunchInfo &launch_info,
lldb_private::Debugger &debugger,
- lldb_private::Target *target, // Can be NULL, if NULL create a new target, else use existing one
+ lldb_private::Target *target, // Can be nullptr, if nullptr create a new target, else use existing one
lldb_private::Error &error) override;
std::string
@@ -183,7 +180,6 @@ protected:
private:
DISALLOW_COPY_AND_ASSIGN (PlatformPOSIX);
-
};
-#endif // liblldb_PlatformPOSIX_h_
+#endif // liblldb_PlatformPOSIX_h_
Modified: lldb/trunk/source/Plugins/Platform/Windows/PlatformWindows.cpp
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Plugins/Platform/Windows/PlatformWindows.cpp?rev=251374&r1=251373&r2=251374&view=diff
==============================================================================
--- lldb/trunk/source/Plugins/Platform/Windows/PlatformWindows.cpp (original)
+++ lldb/trunk/source/Plugins/Platform/Windows/PlatformWindows.cpp Mon Oct 26 19:45:06 2015
@@ -1,4 +1,4 @@
-//===-- PlatformWindows.cpp ---------------------------------------*- C++ -*-===//
+//===-- PlatformWindows.cpp -------------------------------------*- C++ -*-===//
//
// The LLVM Compiler Infrastructure
//
@@ -66,7 +66,7 @@ namespace
std::vector<ArchSpec> m_archs;
};
-}
+} // anonymous namespace
PlatformSP
PlatformWindows::CreateInstance (bool force, const lldb_private::ArchSpec *arch)
@@ -113,7 +113,6 @@ PlatformWindows::CreateInstance (bool fo
if (create)
return PlatformSP(new PlatformWindows (is_host));
return PlatformSP();
-
}
lldb_private::ConstString
@@ -140,13 +139,13 @@ PlatformWindows::GetPluginDescriptionSta
}
lldb_private::ConstString
-PlatformWindows::GetPluginName(void)
+PlatformWindows::GetPluginName()
{
return GetPluginNameStatic(IsHost());
}
void
-PlatformWindows::Initialize(void)
+PlatformWindows::Initialize()
{
Platform::Initialize ();
@@ -197,9 +196,7 @@ PlatformWindows::PlatformWindows (bool i
/// The destructor is virtual since this class is designed to be
/// inherited from by the plug-in instance.
//------------------------------------------------------------------
-PlatformWindows::~PlatformWindows()
-{
-}
+PlatformWindows::~PlatformWindows() = default;
bool
PlatformWindows::GetModuleSpec (const FileSpec& module_file_spec,
@@ -263,13 +260,13 @@ PlatformWindows::ResolveExecutable (cons
{
if (resolved_module_spec.GetArchitecture().IsValid())
{
- error = ModuleList::GetSharedModule (resolved_module_spec,
- exe_module_sp,
- NULL,
- NULL,
- NULL);
+ error = ModuleList::GetSharedModule(resolved_module_spec,
+ exe_module_sp,
+ nullptr,
+ nullptr,
+ nullptr);
- if (!exe_module_sp || exe_module_sp->GetObjectFile() == NULL)
+ if (!exe_module_sp || exe_module_sp->GetObjectFile() == nullptr)
{
exe_module_sp.reset();
error.SetErrorStringWithFormat ("'%s' doesn't contain the architecture %s",
@@ -285,11 +282,11 @@ PlatformWindows::ResolveExecutable (cons
StreamString arch_names;
for (uint32_t idx = 0; GetSupportedArchitectureAtIndex (idx, resolved_module_spec.GetArchitecture()); ++idx)
{
- error = ModuleList::GetSharedModule (resolved_module_spec,
- exe_module_sp,
- NULL,
- NULL,
- NULL);
+ error = ModuleList::GetSharedModule(resolved_module_spec,
+ exe_module_sp,
+ nullptr,
+ nullptr,
+ nullptr);
// Did we find an executable using one of the
if (error.Success())
{
@@ -328,7 +325,7 @@ size_t
PlatformWindows::GetSoftwareBreakpointTrapOpcode (Target &target, BreakpointSite *bp_site)
{
ArchSpec arch = target.GetArchitecture();
- const uint8_t *trap_opcode = NULL;
+ const uint8_t *trap_opcode = nullptr;
size_t trap_opcode_size = 0;
switch (arch.GetMachine())
@@ -405,7 +402,7 @@ PlatformWindows::GetHostname ()
if (m_remote_platform_sp)
return m_remote_platform_sp->GetHostname ();
- return NULL;
+ return nullptr;
}
bool
@@ -581,18 +578,18 @@ PlatformWindows::Attach(ProcessAttachInf
return process_sp;
}
- if (target == NULL)
+ if (target == nullptr)
{
TargetSP new_target_sp;
FileSpec emptyFileSpec;
ArchSpec emptyArchSpec;
- error = debugger.GetTargetList().CreateTarget (debugger,
- NULL,
- NULL,
- false,
- NULL,
- new_target_sp);
+ error = debugger.GetTargetList().CreateTarget(debugger,
+ nullptr,
+ nullptr,
+ false,
+ nullptr,
+ new_target_sp);
target = new_target_sp.get();
}
@@ -602,7 +599,7 @@ PlatformWindows::Attach(ProcessAttachInf
debugger.GetTargetList().SetSelectedTarget(target);
const char *plugin_name = attach_info.GetProcessPluginName();
- process_sp = target->CreateProcess(attach_info.GetListenerForProcess(debugger), plugin_name, NULL);
+ process_sp = target->CreateProcess(attach_info.GetListenerForProcess(debugger), plugin_name, nullptr);
process_sp->HijackProcessEvents(attach_info.GetHijackListener().get());
if (process_sp)
@@ -621,7 +618,7 @@ PlatformWindows::GetUserName (uint32_t u
if (IsRemote() && m_remote_platform_sp)
return m_remote_platform_sp->GetUserName(uid);
- return NULL;
+ return nullptr;
}
const char *
@@ -633,7 +630,7 @@ PlatformWindows::GetGroupName (uint32_t
if (IsRemote() && m_remote_platform_sp)
return m_remote_platform_sp->GetGroupName(gid);
- return NULL;
+ return nullptr;
}
Error
Modified: lldb/trunk/source/Plugins/Platform/Windows/PlatformWindows.h
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Plugins/Platform/Windows/PlatformWindows.h?rev=251374&r1=251373&r2=251374&view=diff
==============================================================================
--- lldb/trunk/source/Plugins/Platform/Windows/PlatformWindows.h (original)
+++ lldb/trunk/source/Plugins/Platform/Windows/PlatformWindows.h Mon Oct 26 19:45:06 2015
@@ -1,4 +1,4 @@
-//===-- PlatformWindows.h --------------------------------------/*- C++ -*-===//
+//===-- PlatformWindows.h ---------------------------------------*- C++ -*-===//
//
// The LLVM Compiler Infrastructure
//
@@ -22,17 +22,15 @@ namespace lldb_private
class PlatformWindows : public Platform
{
public:
+ PlatformWindows(bool is_host);
- static void
- Initialize(void);
+ ~PlatformWindows() override;
static void
- Terminate(void);
-
- PlatformWindows(bool is_host);
+ Initialize();
- virtual
- ~PlatformWindows(void);
+ static void
+ Terminate();
//------------------------------------------------------------
// lldb_private::PluginInterface functions
@@ -40,7 +38,6 @@ public:
static lldb::PlatformSP
CreateInstance (bool force, const lldb_private::ArchSpec *arch);
-
static lldb_private::ConstString
GetPluginNameStatic(bool is_host);
@@ -48,10 +45,10 @@ public:
GetPluginDescriptionStatic(bool is_host);
lldb_private::ConstString
- GetPluginName(void) override;
+ GetPluginName() override;
uint32_t
- GetPluginVersion(void) override
+ GetPluginVersion() override
{
return 1;
}
@@ -70,7 +67,7 @@ public:
const FileSpecList *module_search_paths_ptr) override;
const char *
- GetDescription(void) override
+ GetDescription() override
{
return GetPluginDescriptionStatic(IsHost());
}
@@ -80,7 +77,7 @@ public:
lldb_private::BreakpointSite *bp_site) override;
bool
- GetRemoteOSVersion(void) override;
+ GetRemoteOSVersion() override;
bool
GetRemoteOSBuildString(std::string &s) override;
@@ -90,19 +87,19 @@ public:
// Remote Platform subclasses need to override this function
lldb_private::ArchSpec
- GetRemoteSystemArchitecture(void) override;
+ GetRemoteSystemArchitecture() override;
bool
- IsConnected(void) const override;
+ IsConnected() const override;
lldb_private::Error
ConnectRemote(lldb_private::Args& args) override;
lldb_private::Error
- DisconnectRemote( void ) override;
+ DisconnectRemote() override;
const char *
- GetHostname( void ) override;
+ GetHostname() override;
const char *
GetUserName(uint32_t uid) override;
@@ -167,6 +164,6 @@ private:
DISALLOW_COPY_AND_ASSIGN (PlatformWindows);
};
-}
+} // namespace lldb_private
-#endif // liblldb_PlatformWindows_h_
+#endif // liblldb_PlatformWindows_h_
More information about the lldb-commits
mailing list