Skip to content

Commit 9aae8ef

Browse files
[Scalar] Use SmallPtrSet directly instead of SmallSet (NFC) (#154473)
I'm trying to remove the redirection in SmallSet.h: template <typename PointeeType, unsigned N> class SmallSet<PointeeType*, N> : public SmallPtrSet<PointeeType*, N> {}; to make it clear that we are using SmallPtrSet. There are only handful places that rely on this redirection. This patch replaces SmallSet to SmallPtrSet where the element type is a pointer.
1 parent 7be06db commit 9aae8ef

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

llvm/lib/Transforms/Scalar/RewriteStatepointsForGC.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2218,7 +2218,7 @@ static void relocationViaAlloca(
22182218
/// vector. Doing so has the effect of changing the output of a couple of
22192219
/// tests in ways which make them less useful in testing fused safepoints.
22202220
template <typename T> static void unique_unsorted(SmallVectorImpl<T> &Vec) {
2221-
SmallSet<T, 8> Seen;
2221+
SmallPtrSet<T, 8> Seen;
22222222
erase_if(Vec, [&](const T &V) { return !Seen.insert(V).second; });
22232223
}
22242224

0 commit comments

Comments
 (0)