diff options
| author | Dimitry Andric <dim@FreeBSD.org> | 2022-07-24 15:03:44 +0000 |
|---|---|---|
| committer | Dimitry Andric <dim@FreeBSD.org> | 2022-07-24 15:03:44 +0000 |
| commit | 4b4fe385e49bd883fd183b5f21c1ea486c722e61 (patch) | |
| tree | c3d8fdb355c9c73e57723718c22103aaf7d15aa6 /lldb/source/Target | |
| parent | 1f917f69ff07f09b6dbb670971f57f8efe718b84 (diff) | |
Diffstat (limited to 'lldb/source/Target')
| -rw-r--r-- | lldb/source/Target/DynamicRegisterInfo.cpp | 2 | ||||
| -rw-r--r-- | lldb/source/Target/Target.cpp | 2 | ||||
| -rw-r--r-- | lldb/source/Target/TargetList.cpp | 3 | ||||
| -rw-r--r-- | lldb/source/Target/Thread.cpp | 3 | ||||
| -rw-r--r-- | lldb/source/Target/UnixSignals.cpp | 7 |
5 files changed, 8 insertions, 9 deletions
diff --git a/lldb/source/Target/DynamicRegisterInfo.cpp b/lldb/source/Target/DynamicRegisterInfo.cpp index e2962b02ed7f..14c3faae38df 100644 --- a/lldb/source/Target/DynamicRegisterInfo.cpp +++ b/lldb/source/Target/DynamicRegisterInfo.cpp @@ -483,7 +483,7 @@ void DynamicRegisterInfo::Finalize(const ArchSpec &arch) { end = m_invalidate_regs_map.end(); pos != end; ++pos) { if (pos->second.size() > 1) { - llvm::sort(pos->second.begin(), pos->second.end()); + llvm::sort(pos->second); reg_num_collection::iterator unique_end = std::unique(pos->second.begin(), pos->second.end()); if (unique_end != pos->second.end()) diff --git a/lldb/source/Target/Target.cpp b/lldb/source/Target/Target.cpp index 65064ecf75b1..f16fc6b5da85 100644 --- a/lldb/source/Target/Target.cpp +++ b/lldb/source/Target/Target.cpp @@ -776,7 +776,7 @@ void Target::GetBreakpointNames(std::vector<std::string> &names) { for (auto bp_name : m_breakpoint_names) { names.push_back(bp_name.first.AsCString()); } - llvm::sort(names.begin(), names.end()); + llvm::sort(names); } bool Target::ProcessIsValid() { diff --git a/lldb/source/Target/TargetList.cpp b/lldb/source/Target/TargetList.cpp index 214e98ee91ed..829036976a21 100644 --- a/lldb/source/Target/TargetList.cpp +++ b/lldb/source/Target/TargetList.cpp @@ -509,8 +509,7 @@ uint32_t TargetList::GetIndexOfTarget(lldb::TargetSP target_sp) const { } void TargetList::AddTargetInternal(TargetSP target_sp, bool do_select) { - lldbassert(std::find(m_target_list.begin(), m_target_list.end(), target_sp) == - m_target_list.end() && + lldbassert(!llvm::is_contained(m_target_list, target_sp) && "target already exists it the list"); m_target_list.push_back(std::move(target_sp)); if (do_select) diff --git a/lldb/source/Target/Thread.cpp b/lldb/source/Target/Thread.cpp index 3803748be297..f63b57fd4e62 100644 --- a/lldb/source/Target/Thread.cpp +++ b/lldb/source/Target/Thread.cpp @@ -2022,7 +2022,8 @@ lldb::ValueObjectSP Thread::GetSiginfoValue() { llvm::Optional<uint64_t> type_size = type.GetByteSize(nullptr); assert(type_size); - llvm::Expected<std::unique_ptr<llvm::MemoryBuffer>> data = GetSiginfo(type_size.getValue()); + llvm::Expected<std::unique_ptr<llvm::MemoryBuffer>> data = + GetSiginfo(type_size.value()); if (!data) return ValueObjectConstResult::Create(&target, Status(data.takeError())); diff --git a/lldb/source/Target/UnixSignals.cpp b/lldb/source/Target/UnixSignals.cpp index 4ae848a98edd..3ece3ee24cbe 100644 --- a/lldb/source/Target/UnixSignals.cpp +++ b/lldb/source/Target/UnixSignals.cpp @@ -300,14 +300,13 @@ UnixSignals::GetFilteredSignals(llvm::Optional<bool> should_suppress, // If any of filtering conditions are not met, we move on to the next // signal. - if (should_suppress && - signal_suppress != should_suppress.getValue()) + if (should_suppress && signal_suppress != should_suppress.value()) continue; - if (should_stop && signal_stop != should_stop.getValue()) + if (should_stop && signal_stop != should_stop.value()) continue; - if (should_notify && signal_notify != should_notify.getValue()) + if (should_notify && signal_notify != should_notify.value()) continue; result.push_back(signo); |
