[llvm] [llvm] Replace unordered_{map,set} with Dense{Map,Set}/SmallPtrSet (PR #202222)
Fangrui Song via llvm-commits
llvm-commits at lists.llvm.org
Fri Jun 12 23:11:26 PDT 2026
================
@@ -2235,7 +2235,7 @@ Error Object::removeSections(
// Now make sure there are no remaining references to the sections that will
// be removed. Sometimes it is impossible to remove a reference so we emit
// an error here instead.
- std::unordered_set<const SectionBase *> RemoveSections;
+ SmallPtrSet<const SectionBase *, 0> RemoveSections;
----------------
MaskRay wrote:
For these cases that performance don't matter, I usually prefer 0 to generate smaller code. SmallPtrSet also generates smaller code than std::unordered_set.
https://github.com/llvm/llvm-project/pull/202222
More information about the llvm-commits
mailing list