diff options
author | Tatyana Krasnukha <tatyana@synopsys.com> | 2018-09-26 18:50:19 +0000 |
---|---|---|
committer | Tatyana Krasnukha <tatyana@synopsys.com> | 2018-09-26 18:50:19 +0000 |
commit | 09ee9260309c712d46be844aef00bdda2d8c327e (patch) | |
tree | e0bea494ce9c89a8c835412cd7c34ae9c6f68246 /lldb/source/Plugins/LanguageRuntime | |
parent | adc181b995c852b53a1a28a09650acf3d1e1fba0 (diff) |
Replace "nullptr-terminated" C-arrays of OptionValueEnumeration with safer llvm::ArrayRef
Differential Revision: https://reviews.llvm.org/D49017
Diffstat (limited to 'lldb/source/Plugins/LanguageRuntime')
-rw-r--r-- | lldb/source/Plugins/LanguageRuntime/ObjC/AppleObjCRuntime/AppleObjCRuntimeV2.cpp | 4 | ||||
-rw-r--r-- | lldb/source/Plugins/LanguageRuntime/RenderScript/RenderScriptRuntime/RenderScriptRuntime.cpp | 18 |
2 files changed, 11 insertions, 11 deletions
diff --git a/lldb/source/Plugins/LanguageRuntime/ObjC/AppleObjCRuntime/AppleObjCRuntimeV2.cpp b/lldb/source/Plugins/LanguageRuntime/ObjC/AppleObjCRuntime/AppleObjCRuntimeV2.cpp index 122ad85cdda..253e69d038d 100644 --- a/lldb/source/Plugins/LanguageRuntime/ObjC/AppleObjCRuntime/AppleObjCRuntimeV2.cpp +++ b/lldb/source/Plugins/LanguageRuntime/ObjC/AppleObjCRuntime/AppleObjCRuntimeV2.cpp @@ -475,9 +475,9 @@ LanguageRuntime *AppleObjCRuntimeV2::CreateInstance(Process *process, return NULL; } -static OptionDefinition g_objc_classtable_dump_options[] = { +static constexpr OptionDefinition g_objc_classtable_dump_options[] = { {LLDB_OPT_SET_ALL, false, "verbose", 'v', OptionParser::eNoArgument, - nullptr, nullptr, 0, eArgTypeNone, + nullptr, {}, 0, eArgTypeNone, "Print ivar and method information in detail"}}; class CommandObjectObjC_ClassTable_Dump : public CommandObjectParsed { diff --git a/lldb/source/Plugins/LanguageRuntime/RenderScript/RenderScriptRuntime/RenderScriptRuntime.cpp b/lldb/source/Plugins/LanguageRuntime/RenderScript/RenderScriptRuntime/RenderScriptRuntime.cpp index 5434be71450..5961e6ab216 100644 --- a/lldb/source/Plugins/LanguageRuntime/RenderScript/RenderScriptRuntime/RenderScriptRuntime.cpp +++ b/lldb/source/Plugins/LanguageRuntime/RenderScript/RenderScriptRuntime/RenderScriptRuntime.cpp @@ -4171,13 +4171,13 @@ public: } }; -static OptionDefinition g_renderscript_reduction_bp_set_options[] = { +static constexpr OptionDefinition g_renderscript_reduction_bp_set_options[] = { {LLDB_OPT_SET_1, false, "function-role", 't', - OptionParser::eRequiredArgument, nullptr, nullptr, 0, eArgTypeOneLiner, + OptionParser::eRequiredArgument, nullptr, {}, 0, eArgTypeOneLiner, "Break on a comma separated set of reduction kernel types " "(accumulator,outcoverter,combiner,initializer"}, {LLDB_OPT_SET_1, false, "coordinate", 'c', OptionParser::eRequiredArgument, - nullptr, nullptr, 0, eArgTypeValue, + nullptr, {}, 0, eArgTypeValue, "Set a breakpoint on a single invocation of the kernel with specified " "coordinate.\n" "Coordinate takes the form 'x[,y][,z] where x,y,z are positive " @@ -4330,9 +4330,9 @@ private: CommandOptions m_options; }; -static OptionDefinition g_renderscript_kernel_bp_set_options[] = { +static constexpr OptionDefinition g_renderscript_kernel_bp_set_options[] = { {LLDB_OPT_SET_1, false, "coordinate", 'c', OptionParser::eRequiredArgument, - nullptr, nullptr, 0, eArgTypeValue, + nullptr, {}, 0, eArgTypeValue, "Set a breakpoint on a single invocation of the kernel with specified " "coordinate.\n" "Coordinate takes the form 'x[,y][,z] where x,y,z are positive " @@ -4602,9 +4602,9 @@ public: } }; -static OptionDefinition g_renderscript_runtime_alloc_dump_options[] = { +static constexpr OptionDefinition g_renderscript_runtime_alloc_dump_options[] = { {LLDB_OPT_SET_1, false, "file", 'f', OptionParser::eRequiredArgument, - nullptr, nullptr, 0, eArgTypeFilename, + nullptr, {}, 0, eArgTypeFilename, "Print results to specified file instead of command line."}}; class CommandObjectRenderScriptRuntimeContext : public CommandObjectMultiword { @@ -4738,9 +4738,9 @@ private: CommandOptions m_options; }; -static OptionDefinition g_renderscript_runtime_alloc_list_options[] = { +static constexpr OptionDefinition g_renderscript_runtime_alloc_list_options[] = { {LLDB_OPT_SET_1, false, "id", 'i', OptionParser::eRequiredArgument, nullptr, - nullptr, 0, eArgTypeIndex, + {}, 0, eArgTypeIndex, "Only show details of a single allocation with specified id."}}; class CommandObjectRenderScriptRuntimeAllocationList |