summaryrefslogtreecommitdiffstats
path: root/lldb/source/Interpreter/OptionGroupFormat.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'lldb/source/Interpreter/OptionGroupFormat.cpp')
-rw-r--r--lldb/source/Interpreter/OptionGroupFormat.cpp13
1 files changed, 5 insertions, 8 deletions
diff --git a/lldb/source/Interpreter/OptionGroupFormat.cpp b/lldb/source/Interpreter/OptionGroupFormat.cpp
index aa0d3cc3369..b0628ffb35b 100644
--- a/lldb/source/Interpreter/OptionGroupFormat.cpp
+++ b/lldb/source/Interpreter/OptionGroupFormat.cpp
@@ -47,18 +47,15 @@ static OptionDefinition g_option_table[] = {
"The number of total items to display."},
};
-uint32_t OptionGroupFormat::GetNumDefinitions() {
+llvm::ArrayRef<OptionDefinition> OptionGroupFormat::GetDefinitions() {
+ llvm::ArrayRef<OptionDefinition> result = g_option_table;
if (m_byte_size.GetDefaultValue() < UINT64_MAX) {
if (m_count.GetDefaultValue() < UINT64_MAX)
- return 4;
+ return result;
else
- return 3;
+ return result.take_front(3);
}
- return 2;
-}
-
-const OptionDefinition *OptionGroupFormat::GetDefinitions() {
- return g_option_table;
+ return result.take_front(2);
}
Error OptionGroupFormat::SetOptionValue(uint32_t option_idx,
OpenPOWER on IntegriCloud