Skip to content

Commit 16deba3

Browse files
authored
Revert "[ADT] Deprecate the redirection from SmallSet to SmallPtrSet" (llvm#155075)
Reverts llvm#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; ```
1 parent 5631ca6 commit 16deba3

File tree

1 file changed

+1
-22
lines changed

1 file changed

+1
-22
lines changed

llvm/include/llvm/ADT/SmallSet.h

Lines changed: 1 addition & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -269,28 +269,7 @@ class SmallSet {
269269
/// If this set is of pointer values, transparently switch over to using
270270
/// SmallPtrSet for performance.
271271
template <typename PointeeType, unsigned N>
272-
class SmallSet<PointeeType *, N> : public SmallPtrSet<PointeeType *, N> {
273-
using Base = SmallPtrSet<PointeeType *, N>;
274-
275-
public:
276-
// LLVM_DEPRECATED placed between "template" and "class" above won't work for
277-
// some reason. Put a deprecation message on constructors instead.
278-
LLVM_DEPRECATED("Use SmallPtrSet instead", "SmallPtrSet")
279-
SmallSet() = default;
280-
LLVM_DEPRECATED("Use SmallPtrSet instead", "SmallPtrSet")
281-
SmallSet(const SmallSet &) = default;
282-
LLVM_DEPRECATED("Use SmallPtrSet instead", "SmallPtrSet")
283-
SmallSet(SmallSet &&) = default;
284-
template <typename IterT>
285-
LLVM_DEPRECATED("Use SmallPtrSet instead", "SmallPtrSet")
286-
SmallSet(IterT Begin, IterT End) : Base(Begin, End) {}
287-
template <typename Range>
288-
LLVM_DEPRECATED("Use SmallPtrSet instead", "SmallPtrSet")
289-
SmallSet(llvm::from_range_t, Range &&R)
290-
: Base(llvm::from_range, std::move(R)) {}
291-
LLVM_DEPRECATED("Use SmallPtrSet instead", "SmallPtrSet")
292-
SmallSet(std::initializer_list<PointeeType *> L) : Base(L) {}
293-
};
272+
class SmallSet<PointeeType*, N> : public SmallPtrSet<PointeeType*, N> {};
294273

295274
/// Equality comparison for SmallSet.
296275
///

0 commit comments

Comments
 (0)