aboutsummaryrefslogtreecommitdiff
path: root/lldb/source/Breakpoint/BreakpointResolverFileLine.cpp
diff options
context:
space:
mode:
authorKazu Hirata <kazu@google.com>2022-06-19 09:12:01 -0700
committerKazu Hirata <kazu@google.com>2022-06-19 09:12:01 -0700
commitaa88161b378ecb49388eefc28abe2926a229bcfc (patch)
tree62b3139d6f697fdfbfeb913c8bc54c01fd86872d /lldb/source/Breakpoint/BreakpointResolverFileLine.cpp
parent0399473de886595d8ce3346f2cc99c94267496e5 (diff)
downloadllvm-aa88161b378ecb49388eefc28abe2926a229bcfc.zip
llvm-aa88161b378ecb49388eefc28abe2926a229bcfc.tar.gz
llvm-aa88161b378ecb49388eefc28abe2926a229bcfc.tar.bz2
[lldb] Use value_or instead of getValueOr (NFC)
Diffstat (limited to 'lldb/source/Breakpoint/BreakpointResolverFileLine.cpp')
-rw-r--r--lldb/source/Breakpoint/BreakpointResolverFileLine.cpp10
1 files changed, 5 insertions, 5 deletions
diff --git a/lldb/source/Breakpoint/BreakpointResolverFileLine.cpp b/lldb/source/Breakpoint/BreakpointResolverFileLine.cpp
index 508f1cf..ff04452 100644
--- a/lldb/source/Breakpoint/BreakpointResolverFileLine.cpp
+++ b/lldb/source/Breakpoint/BreakpointResolverFileLine.cpp
@@ -100,10 +100,10 @@ BreakpointResolverFileLine::SerializeToStructuredData() {
options_dict_sp->AddStringItem(GetKey(OptionNames::FileName),
m_location_spec.GetFileSpec().GetPath());
options_dict_sp->AddIntegerItem(GetKey(OptionNames::LineNumber),
- m_location_spec.GetLine().getValueOr(0));
+ m_location_spec.GetLine().value_or(0));
options_dict_sp->AddIntegerItem(
GetKey(OptionNames::Column),
- m_location_spec.GetColumn().getValueOr(LLDB_INVALID_COLUMN_NUMBER));
+ m_location_spec.GetColumn().value_or(LLDB_INVALID_COLUMN_NUMBER));
options_dict_sp->AddBooleanItem(GetKey(OptionNames::Inlines),
m_location_spec.GetCheckInlines());
options_dict_sp->AddBooleanItem(GetKey(OptionNames::ExactMatch),
@@ -227,7 +227,7 @@ Searcher::CallbackReturn BreakpointResolverFileLine::SearchCallback(
// file. So we go through the match list and pull out the sets that have the
// same file spec in their line_entry and treat each set separately.
- const uint32_t line = m_location_spec.GetLine().getValueOr(0);
+ const uint32_t line = m_location_spec.GetLine().value_or(0);
const llvm::Optional<uint16_t> column = m_location_spec.GetColumn();
// We'll create a new SourceLocationSpec that can take into account the
@@ -238,7 +238,7 @@ Searcher::CallbackReturn BreakpointResolverFileLine::SearchCallback(
if (is_relative)
search_file_spec.GetDirectory().Clear();
SourceLocationSpec search_location_spec(
- search_file_spec, m_location_spec.GetLine().getValueOr(0),
+ search_file_spec, m_location_spec.GetLine().value_or(0),
m_location_spec.GetColumn(), m_location_spec.GetCheckInlines(),
m_location_spec.GetExactMatch());
@@ -272,7 +272,7 @@ lldb::SearchDepth BreakpointResolverFileLine::GetDepth() {
void BreakpointResolverFileLine::GetDescription(Stream *s) {
s->Printf("file = '%s', line = %u, ",
m_location_spec.GetFileSpec().GetPath().c_str(),
- m_location_spec.GetLine().getValueOr(0));
+ m_location_spec.GetLine().value_or(0));
auto column = m_location_spec.GetColumn();
if (column)
s->Printf("column = %u, ", *column);