aboutsummaryrefslogtreecommitdiff
path: root/lldb/source/Commands/CommandObjectFrame.cpp
diff options
context:
space:
mode:
authorKazu Hirata <kazu@google.com>2022-06-25 11:55:57 -0700
committerKazu Hirata <kazu@google.com>2022-06-25 11:55:57 -0700
commitaa8feeefd3ac6c78ee8f67bf033976fc7d68bc6d (patch)
treed207b35cfb445636f41204bcfe51f6ca3a94a3ba /lldb/source/Commands/CommandObjectFrame.cpp
parentb8df4093e4d82c67a419911a46b63482043643e5 (diff)
downloadllvm-aa8feeefd3ac6c78ee8f67bf033976fc7d68bc6d.zip
llvm-aa8feeefd3ac6c78ee8f67bf033976fc7d68bc6d.tar.gz
llvm-aa8feeefd3ac6c78ee8f67bf033976fc7d68bc6d.tar.bz2
Don't use Optional::hasValue (NFC)
Diffstat (limited to 'lldb/source/Commands/CommandObjectFrame.cpp')
-rw-r--r--lldb/source/Commands/CommandObjectFrame.cpp10
1 files changed, 5 insertions, 5 deletions
diff --git a/lldb/source/Commands/CommandObjectFrame.cpp b/lldb/source/Commands/CommandObjectFrame.cpp
index 4081e87..dfe1e14 100644
--- a/lldb/source/Commands/CommandObjectFrame.cpp
+++ b/lldb/source/Commands/CommandObjectFrame.cpp
@@ -137,16 +137,16 @@ 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()) {
+ valobj_sp = frame_sp->GuessValueForAddress(*m_options.address);
+ } else if (m_options.reg) {
valobj_sp = frame_sp->GuessValueForRegisterAndOffset(
- m_options.reg.getValue(), m_options.offset.value_or(0));
+ m_options.reg.value(), m_options.offset.value_or(0));
} else {
StopInfoSP stop_info_sp = thread->GetStopInfo();
if (!stop_info_sp) {