[lld] [lld][COFF] Use `.contains` rather than `.count` for set membership. NFC (PR #177067)
Martin Storsjö via llvm-commits
llvm-commits at lists.llvm.org
Wed Jan 21 09:03:04 PST 2026
================
@@ -864,9 +865,9 @@ void LinkerDriver::addWinSysRootLibSearchPaths() {
// Libraries specified by `/nodefaultlib:` may not be found in incomplete
// search paths before lld infers a machine type from input files.
- std::set<std::string> noDefaultLibs;
- for (const std::string &path : ctx.config.noDefaultLibs)
- noDefaultLibs.insert(findLib(path).lower());
+ llvm::StringSet<> noDefaultLibs;
+ for (auto &iter : ctx.config.noDefaultLibs)
+ noDefaultLibs.insert(findLib(iter.first()).lower());
----------------
mstorsjo wrote:
Right, that's quite possible. But I don't want to take AI's word for it - can you look up somewhere in `StringSet`/`StringMap` which says or shows this?
https://github.com/llvm/llvm-project/pull/177067
More information about the llvm-commits
mailing list