diff options
author | Kazu Hirata <kazu@google.com> | 2022-06-26 19:29:40 -0700 |
---|---|---|
committer | Kazu Hirata <kazu@google.com> | 2022-06-26 19:29:40 -0700 |
commit | 96d1b4ddb2cc37b900692215f7598ff5970b0baa (patch) | |
tree | 776f5208605bd70de9e55027ecf7543415efa7d6 /lldb/source/Commands/CommandObjectFrame.cpp | |
parent | 2d70eff80229be18e5f688b04164f96f52b52714 (diff) | |
download | llvm-96d1b4ddb2cc37b900692215f7598ff5970b0baa.zip llvm-96d1b4ddb2cc37b900692215f7598ff5970b0baa.tar.gz llvm-96d1b4ddb2cc37b900692215f7598ff5970b0baa.tar.bz2 |
[lld] Don't use Optional::hasValue (NFC)
This patch replaces x.hasValue() with x where x is contextually
convertible to bool.
Diffstat (limited to 'lldb/source/Commands/CommandObjectFrame.cpp')
-rw-r--r-- | lldb/source/Commands/CommandObjectFrame.cpp | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/lldb/source/Commands/CommandObjectFrame.cpp b/lldb/source/Commands/CommandObjectFrame.cpp index 4081e87..93c41ee 100644 --- a/lldb/source/Commands/CommandObjectFrame.cpp +++ b/lldb/source/Commands/CommandObjectFrame.cpp @@ -137,14 +137,14 @@ protected: ValueObjectSP valobj_sp; - if (m_options.address.hasValue()) { - if (m_options.reg.hasValue() || m_options.offset.hasValue()) { + if (m_options.address) { + if (m_options.reg || m_options.offset) { result.AppendError( "`frame diagnose --address` is incompatible with other arguments."); return false; } valobj_sp = frame_sp->GuessValueForAddress(m_options.address.getValue()); - } else if (m_options.reg.hasValue()) { + } else if (m_options.reg) { valobj_sp = frame_sp->GuessValueForRegisterAndOffset( m_options.reg.getValue(), m_options.offset.value_or(0)); } else { |