diff options
author | Alex Langford <alangford@apple.com> | 2024-02-14 10:20:58 -0800 |
---|---|---|
committer | GitHub <noreply@github.com> | 2024-02-14 10:20:58 -0800 |
commit | 307cd883546348cd658d74699915fd48ae01e9a0 (patch) | |
tree | deebed4fa377a200eba0c65e77262b3aa9903ca4 /clang/lib/Basic/FileManager.cpp | |
parent | 275eeda32f4f32d2385043f8d1d8af3d4f65bb2c (diff) | |
download | llvm-307cd883546348cd658d74699915fd48ae01e9a0.zip llvm-307cd883546348cd658d74699915fd48ae01e9a0.tar.gz llvm-307cd883546348cd658d74699915fd48ae01e9a0.tar.bz2 |
[lldb][NFCI] Remove CommandObjectProcessHandle::VerifyCommandOptionValue (#79901)
I was refactoring something else but ran into this function. It was
somewhat confusing to read through and understand, but it boils down to
two steps:
- First we try `OptionArgParser::ToBoolean`. If that works, then we're
good to go.
- Second, we try `llvm::to_integer` to see if it's an integer. If it
parses to 0 or 1, we're good.
- Failing either of the steps above means we cannot parse it into a
bool.
Instead of having an integer out param and a bool return value, the
interface is better served with an optional<bool> -- Either it parses
into true or false, or you get back nothing (nullopt).
Diffstat (limited to 'clang/lib/Basic/FileManager.cpp')
0 files changed, 0 insertions, 0 deletions