[llvm] 16deba3 - Revert "[ADT] Deprecate the redirection from SmallSet to SmallPtrSet" (#155075)

via llvm-commits llvm-commits at lists.llvm.org
Fri Aug 22 22:12:36 PDT 2025


Author: Jordan Rupprecht
Date: 2025-08-23T05:12:32Z
New Revision: 16deba3f24af6f5ae6661ba3dcf1bc979a3010c5

URL: https://github.com/llvm/llvm-project/commit/16deba3f24af6f5ae6661ba3dcf1bc979a3010c5
DIFF: https://github.com/llvm/llvm-project/commit/16deba3f24af6f5ae6661ba3dcf1bc979a3010c5.diff

LOG: Revert "[ADT] Deprecate the redirection from SmallSet to SmallPtrSet" (#155075)

Reverts llvm/llvm-project#154891

The added constructors changes the semantics of other implicitly defined
constructors, which causes downstream breakages.

```
... error: object of type 'X' cannot be assigned because its copy assignment operator is implicitly deleted
... note: explicitly defaulted function was implicitly deleted here
... note: copy assignment operator of 'X' is implicitly deleted because field 'x' has a deleted copy assignment operator
llvm/include/llvm/ADT/SmallSet.h:283:3: note: copy assignment operator is implicitly deleted because 'SmallSet<const XX *, 2>' has a user-declared move constructor
  283 |   SmallSet(SmallSet &&) = default;
```

Added: 
    

Modified: 
    llvm/include/llvm/ADT/SmallSet.h

Removed: 
    


################################################################################
diff  --git a/llvm/include/llvm/ADT/SmallSet.h b/llvm/include/llvm/ADT/SmallSet.h
index 802a257aaf6ad..eb434bcb71717 100644
--- a/llvm/include/llvm/ADT/SmallSet.h
+++ b/llvm/include/llvm/ADT/SmallSet.h
@@ -269,28 +269,7 @@ 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> {
-  using Base = SmallPtrSet<PointeeType *, N>;
-
-public:
-  // LLVM_DEPRECATED placed between "template" and "class" above won't work for
-  // some reason.  Put a deprecation message on constructors instead.
-  LLVM_DEPRECATED("Use SmallPtrSet instead", "SmallPtrSet")
-  SmallSet() = default;
-  LLVM_DEPRECATED("Use SmallPtrSet instead", "SmallPtrSet")
-  SmallSet(const SmallSet &) = default;
-  LLVM_DEPRECATED("Use SmallPtrSet instead", "SmallPtrSet")
-  SmallSet(SmallSet &&) = default;
-  template <typename IterT>
-  LLVM_DEPRECATED("Use SmallPtrSet instead", "SmallPtrSet")
-  SmallSet(IterT Begin, IterT End) : Base(Begin, End) {}
-  template <typename Range>
-  LLVM_DEPRECATED("Use SmallPtrSet instead", "SmallPtrSet")
-  SmallSet(llvm::from_range_t, Range &&R)
-      : Base(llvm::from_range, std::move(R)) {}
-  LLVM_DEPRECATED("Use SmallPtrSet instead", "SmallPtrSet")
-  SmallSet(std::initializer_list<PointeeType *> L) : Base(L) {}
-};
+class SmallSet<PointeeType*, N> : public SmallPtrSet<PointeeType*, N> {};
 
 /// Equality comparison for SmallSet.
 ///


        


More information about the llvm-commits mailing list