diff options
author | Kazu Hirata <kazu@google.com> | 2025-08-19 07:11:39 -0700 |
---|---|---|
committer | GitHub <noreply@github.com> | 2025-08-19 07:11:39 -0700 |
commit | 136b541304c07bd45a12304248a73669811e6fce (patch) | |
tree | 874c79cbc595f0d1d130835f407908c682046f24 /clang/lib/Sema/SemaModule.cpp | |
parent | 965b7c2bfc819b6afe06b585cbf2b2389e9d4058 (diff) | |
download | llvm-136b541304c07bd45a12304248a73669811e6fce.zip llvm-136b541304c07bd45a12304248a73669811e6fce.tar.gz llvm-136b541304c07bd45a12304248a73669811e6fce.tar.bz2 |
[clang] Replace SmallSet with SmallPtrSet (NFC) (#154262)
This patch replaces SmallSet<T *, N> with SmallPtrSet<T *, N>. Note
that SmallSet.h "redirects" SmallSet to SmallPtrSet for pointer
element types:
template <typename PointeeType, unsigned N>
class SmallSet<PointeeType*, N> : public SmallPtrSet<PointeeType*, N>
{};
We only have 30 instances that rely on this "redirection", with about
half of them under clang/. Since the redirection doesn't improve
readability, this patch replaces SmallSet with SmallPtrSet for pointer
element types.
I'm planning to remove the redirection eventually.
Diffstat (limited to 'clang/lib/Sema/SemaModule.cpp')
-rw-r--r-- | clang/lib/Sema/SemaModule.cpp | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/clang/lib/Sema/SemaModule.cpp b/clang/lib/Sema/SemaModule.cpp index 1ecc5c7..773bcb2 100644 --- a/clang/lib/Sema/SemaModule.cpp +++ b/clang/lib/Sema/SemaModule.cpp @@ -137,7 +137,7 @@ makeTransitiveImportsVisible(ASTContext &Ctx, VisibleModuleSet &VisibleModules, "modules only."); llvm::SmallVector<Module *, 4> Worklist; - llvm::SmallSet<Module *, 16> Visited; + llvm::SmallPtrSet<Module *, 16> Visited; Worklist.push_back(Imported); Module *FoundPrimaryModuleInterface = |