From 9aae8ef329894865e5dee2e87da459630b189cfb Mon Sep 17 00:00:00 2001 From: Kazu Hirata Date: Wed, 20 Aug 2025 16:30:39 -0700 Subject: [PATCH] [Scalar] Use SmallPtrSet directly instead of SmallSet (NFC) (#154473) I'm trying to remove the redirection in SmallSet.h: template class SmallSet : public SmallPtrSet {}; 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. --- llvm/lib/Transforms/Scalar/RewriteStatepointsForGC.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/llvm/lib/Transforms/Scalar/RewriteStatepointsForGC.cpp b/llvm/lib/Transforms/Scalar/RewriteStatepointsForGC.cpp index 8b15445ae92d..5d87d7a79a01 100644 --- a/llvm/lib/Transforms/Scalar/RewriteStatepointsForGC.cpp +++ b/llvm/lib/Transforms/Scalar/RewriteStatepointsForGC.cpp @@ -2218,7 +2218,7 @@ static void relocationViaAlloca( /// vector. Doing so has the effect of changing the output of a couple of /// tests in ways which make them less useful in testing fused safepoints. template static void unique_unsorted(SmallVectorImpl &Vec) { - SmallSet Seen; + SmallPtrSet Seen; erase_if(Vec, [&](const T &V) { return !Seen.insert(V).second; }); }