[llvm] [ADT] Deprecate the redirection from SmallSet to SmallPtrSet (PR #154891)

Kazu Hirata via llvm-commits llvm-commits at lists.llvm.org
Fri Aug 22 13:02:49 PDT 2025


================
@@ -269,7 +269,13 @@ class SmallSet {
 /// If this set is of pointer values, transparently switch over to using
 /// SmallPtrSet for performance.
 template <typename PointeeType, unsigned N>
-class SmallSet<PointeeType*, N> : public SmallPtrSet<PointeeType*, N> {};
+class SmallSet<PointeeType *, N> : public SmallPtrSet<PointeeType *, N> {
+public:
+  // LLVM_DEPRECATED placed between "template" and "class" above won't work for
+  // some reason.  Put a deprecation message on the default constructor instead.
+  LLVM_DEPRECATED("Use SmallPtrSet instead", "SmallPtrSet")
+  SmallSet<PointeeType *, N>() = default;
----------------
kazutakahirata wrote:

Done.  Thanks for the review!

https://github.com/llvm/llvm-project/pull/154891


More information about the llvm-commits mailing list