[lldb] Use a range-based for loop instead of llvm::for_each (NFC) (#149541)

LLVM Coding Standards discourages llvm::for_each unless we already
have a callable.
This commit is contained in:
Kazu Hirata 2025-07-18 13:32:42 -07:00 committed by GitHub
parent 9d9662e4bd
commit 3c1a09d939
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -87,9 +87,8 @@ private:
void ServerURLsChangedCallback() {
m_server_urls = GetDebugInfoDURLs();
llvm::SmallVector<llvm::StringRef> dbginfod_urls;
llvm::for_each(m_server_urls, [&](const auto &obj) {
for (const auto &obj : m_server_urls)
dbginfod_urls.push_back(obj.ref());
});
llvm::setDefaultDebuginfodUrls(dbginfod_urls);
}
// Storage for the StringRef's used within the Debuginfod library.