summaryrefslogtreecommitdiffstats
path: root/lldb/source/Interpreter/OptionGroupFormat.cpp
diff options
context:
space:
mode:
authorTatyana Krasnukha <tatyana@synopsys.com>2018-09-26 18:50:19 +0000
committerTatyana Krasnukha <tatyana@synopsys.com>2018-09-26 18:50:19 +0000
commit8fe53c490a567d3e9337b974057a239477dbe685 (patch)
tree66605824e7ac9bdd8691bc9fef8415a5f62ab62d /lldb/source/Interpreter/OptionGroupFormat.cpp
parentbcdfcbcb1d8694c0f0630e3c326cbda437b24c14 (diff)
downloadbcm5719-llvm-8fe53c490a567d3e9337b974057a239477dbe685.tar.gz
bcm5719-llvm-8fe53c490a567d3e9337b974057a239477dbe685.zip
Replace "nullptr-terminated" C-arrays of OptionValueEnumeration with safer llvm::ArrayRef
Differential Revision: https://reviews.llvm.org/D49017 llvm-svn: 343130
Diffstat (limited to 'lldb/source/Interpreter/OptionGroupFormat.cpp')
-rw-r--r--lldb/source/Interpreter/OptionGroupFormat.cpp10
1 files changed, 5 insertions, 5 deletions
diff --git a/lldb/source/Interpreter/OptionGroupFormat.cpp b/lldb/source/Interpreter/OptionGroupFormat.cpp
index b64c1932481..6345a633635 100644
--- a/lldb/source/Interpreter/OptionGroupFormat.cpp
+++ b/lldb/source/Interpreter/OptionGroupFormat.cpp
@@ -27,18 +27,18 @@ OptionGroupFormat::OptionGroupFormat(lldb::Format default_format,
OptionGroupFormat::~OptionGroupFormat() {}
-static OptionDefinition g_option_table[] = {
+static constexpr OptionDefinition g_option_table[] = {
{LLDB_OPT_SET_1, false, "format", 'f', OptionParser::eRequiredArgument,
- nullptr, nullptr, 0, eArgTypeFormat,
+ nullptr, {}, 0, eArgTypeFormat,
"Specify a format to be used for display."},
{LLDB_OPT_SET_2, false, "gdb-format", 'G', OptionParser::eRequiredArgument,
- nullptr, nullptr, 0, eArgTypeGDBFormat,
+ nullptr, {}, 0, eArgTypeGDBFormat,
"Specify a format using a GDB format specifier string."},
{LLDB_OPT_SET_3, false, "size", 's', OptionParser::eRequiredArgument,
- nullptr, nullptr, 0, eArgTypeByteSize,
+ nullptr, {}, 0, eArgTypeByteSize,
"The size in bytes to use when displaying with the selected format."},
{LLDB_OPT_SET_4, false, "count", 'c', OptionParser::eRequiredArgument,
- nullptr, nullptr, 0, eArgTypeCount,
+ nullptr, {}, 0, eArgTypeCount,
"The number of total items to display."},
};
OpenPOWER on IntegriCloud