aboutsummaryrefslogtreecommitdiff
path: root/clang/lib/Sema/SemaModule.cpp
diff options
context:
space:
mode:
authorKazu Hirata <kazu@google.com>2025-08-19 07:11:39 -0700
committerGitHub <noreply@github.com>2025-08-19 07:11:39 -0700
commit136b541304c07bd45a12304248a73669811e6fce (patch)
tree874c79cbc595f0d1d130835f407908c682046f24 /clang/lib/Sema/SemaModule.cpp
parent965b7c2bfc819b6afe06b585cbf2b2389e9d4058 (diff)
downloadllvm-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.cpp2
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 =