diff options
| author | Kazu Hirata <kazu@google.com> | 2022-08-13 12:55:50 -0700 |
|---|---|---|
| committer | Kazu Hirata <kazu@google.com> | 2022-08-13 12:55:50 -0700 |
| commit | 448c466636ca8f2415cf60adcbcdde67fa7cbc26 (patch) | |
| tree | 78d31018dc08e58d9d26b56b18cb275392ab1217 /lldb | |
| parent | 2febc32c9c7dd9d23bb340568ef3178331d9afbe (diff) | |
Use llvm::erase_value (NFC)
Diffstat (limited to 'lldb')
| -rw-r--r-- | lldb/source/Host/linux/HostInfoLinux.cpp | 3 | ||||
| -rw-r--r-- | lldb/source/Target/JITLoaderList.cpp | 4 |
2 files changed, 2 insertions, 5 deletions
diff --git a/lldb/source/Host/linux/HostInfoLinux.cpp b/lldb/source/Host/linux/HostInfoLinux.cpp index 0af7a473e1af..712e6983007b 100644 --- a/lldb/source/Host/linux/HostInfoLinux.cpp +++ b/lldb/source/Host/linux/HostInfoLinux.cpp @@ -122,8 +122,7 @@ llvm::StringRef HostInfoLinux::GetDistributionId() { if (strstr(distribution_id, distributor_id_key)) { // strip newlines std::string id_string(distribution_id + strlen(distributor_id_key)); - id_string.erase(std::remove(id_string.begin(), id_string.end(), '\n'), - id_string.end()); + llvm::erase_value(id_string, '\n'); // lower case it and convert whitespace to underscores std::transform( diff --git a/lldb/source/Target/JITLoaderList.cpp b/lldb/source/Target/JITLoaderList.cpp index 92e841b5c94d..9158d0a5e546 100644 --- a/lldb/source/Target/JITLoaderList.cpp +++ b/lldb/source/Target/JITLoaderList.cpp @@ -24,9 +24,7 @@ void JITLoaderList::Append(const JITLoaderSP &jit_loader_sp) { void JITLoaderList::Remove(const JITLoaderSP &jit_loader_sp) { std::lock_guard<std::recursive_mutex> guard(m_jit_loaders_mutex); - m_jit_loaders_vec.erase(std::remove(m_jit_loaders_vec.begin(), - m_jit_loaders_vec.end(), jit_loader_sp), - m_jit_loaders_vec.end()); + llvm::erase_value(m_jit_loaders_vec, jit_loader_sp); } size_t JITLoaderList::GetSize() const { return m_jit_loaders_vec.size(); } |
