================
@@ -76,13 +77,22 @@ class CommandObjectStatsDump : public CommandObjectParsed {
m_all_targets = true;
break;
case 's':
- m_stats_options.summary_only = true;
+ m_stats_options.SetSummaryOnly(true);
break;
case 'f':
- m_stats_options.load_all_debug_info = true;
+ m_stats_options.SetLoadAllDebugInfo(true);
+ break;
+ case 'r':
+ m_stats_options.SetIncludeTargets(OptionArgParser::ToBoolean(
+ "--targets", option_arg, true /* doesn't matter */, error));
----------------
clayborg wrote:
Lets use the new `llvm::Expected<bool> ToBoolean(llvm::StringRef option_arg);`
function:
```
if (auto bool_or_error = OptionArgParser::ToBoolean(option_arg))
m_stats_options.SetIncludeTargets(*bool_or_error);
else
error.SetErrorStringWithFormat("failed to parse --targets boolean value: %s",
llvm::toString(bool_or_error.takeError()).c_str());
```
https://github.com/llvm/llvm-project/pull/95075
_______________________________________________
lldb-commits mailing list
[email protected]
https://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits