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/source/Host/linux/HostInfoLinux.cpp | |
| parent | 2febc32c9c7dd9d23bb340568ef3178331d9afbe (diff) | |
Use llvm::erase_value (NFC)
Diffstat (limited to 'lldb/source/Host/linux/HostInfoLinux.cpp')
| -rw-r--r-- | lldb/source/Host/linux/HostInfoLinux.cpp | 3 |
1 files changed, 1 insertions, 2 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( |
