[PATCH] D156005: Use `getHashValue` in `SetVector::insert` and `SetVector::contains`

Evan Wilde via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Fri Jul 21 16:33:37 PDT 2023


etcwilde added inline comments.


================
Comment at: llvm/include/llvm/ADT/SetVector.h:276
       if (isSmall())
-        return is_contained(vector_, key);
+        return contains(key);
 
----------------
We can probably reduce this entire function down to a call to `contains` since that returns a boolean and this only returns `0` or `1`. Thoughts?


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D156005/new/

https://reviews.llvm.org/D156005



More information about the llvm-commits mailing list