[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 04:12:40 PST 2026
================
@@ -155,14 +155,14 @@ struct Configuration {
// Symbols in this set are considered as live by the garbage collector.
std::vector<Symbol *> gcroot;
- std::set<std::string> noDefaultLibs;
+ llvm::StringSet<> noDefaultLibs;
----------------
mstorsjo wrote:
Note that this change isn't a no-op in itself; a `std::set<std::string>` owns the storage of the strings, while `StringSet` presumably(?) only uses `StringRef` which just references strings whose storage is handled elsewhere.
https://github.com/llvm/llvm-project/pull/177067
More information about the llvm-commits
mailing list