================
@@ -29,6 +29,9 @@ struct OptionArgParser {
 
   static bool ToBoolean(llvm::StringRef s, bool fail_value, bool *success_ptr);
 
+  static bool ToBoolean(llvm::StringRef option_name, llvm::StringRef 
option_arg,
+                        bool fail_value, Status &error);
+
----------------
clayborg wrote:

If we are going to add a function here I would suggest we add it with 
`llvm::Expected`:
```
llvm::Expected<bool> ToBoolean(llvm::StringRef option_arg);
```
This will return a `bool` or a `llvm::Error`. `lldb_private::Status` has a 
constructor that takes an `llvm::Error`. I will show how to use this in the new 
code below.

https://github.com/llvm/llvm-project/pull/95075
_______________________________________________
lldb-commits mailing list
lldb-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits

Reply via email to