Author: Kazu Hirata Date: 2025-07-18T13:32:42-07:00 New Revision: 3c1a09d939f44cbe039ea178af5a77c40b2776a0
URL: https://github.com/llvm/llvm-project/commit/3c1a09d939f44cbe039ea178af5a77c40b2776a0 DIFF: https://github.com/llvm/llvm-project/commit/3c1a09d939f44cbe039ea178af5a77c40b2776a0.diff LOG: [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. Added: Modified: lldb/source/Plugins/SymbolLocator/Debuginfod/SymbolLocatorDebuginfod.cpp Removed: ################################################################################ diff --git a/lldb/source/Plugins/SymbolLocator/Debuginfod/SymbolLocatorDebuginfod.cpp b/lldb/source/Plugins/SymbolLocator/Debuginfod/SymbolLocatorDebuginfod.cpp index f9aa6b1a98765..b775ec98c9a17 100644 --- a/lldb/source/Plugins/SymbolLocator/Debuginfod/SymbolLocatorDebuginfod.cpp +++ b/lldb/source/Plugins/SymbolLocator/Debuginfod/SymbolLocatorDebuginfod.cpp @@ -87,9 +87,8 @@ class PluginProperties : public Properties { 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. _______________________________________________ lldb-commits mailing list lldb-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits