diff options
author | Douglas Gregor <dgregor@apple.com> | 2012-09-11 07:19:42 +0000 |
---|---|---|
committer | Douglas Gregor <dgregor@apple.com> | 2012-09-11 07:19:42 +0000 |
commit | a13cdf4780a885c0d3726fe8d3562b9bc770b7ec (patch) | |
tree | 363c67a8f1cf79f747ccafc84ef7ade4e58c4d64 /lib/AST/CXXInheritance.cpp | |
parent | 04992c7d8e74adff8ad7ca7e6b3e2fe96c47acda (diff) |
Switch a SmallPtrSet/SmallVector pair over to SetVector.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@163600 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/AST/CXXInheritance.cpp')
-rw-r--r-- | lib/AST/CXXInheritance.cpp | 7 |
1 files changed, 3 insertions, 4 deletions
diff --git a/lib/AST/CXXInheritance.cpp b/lib/AST/CXXInheritance.cpp index 3884e4e857..d1eb2b11d1 100644 --- a/lib/AST/CXXInheritance.cpp +++ b/lib/AST/CXXInheritance.cpp @@ -14,6 +14,7 @@ #include "clang/AST/ASTContext.h" #include "clang/AST/RecordLayout.h" #include "clang/AST/DeclCXX.h" +#include "llvm/ADT/SetVector.h" #include <algorithm> #include <set> @@ -25,11 +26,9 @@ void CXXBasePaths::ComputeDeclsFound() { assert(NumDeclsFound == 0 && !DeclsFound && "Already computed the set of declarations"); - llvm::SmallPtrSet<NamedDecl *, 8> KnownDecls; - SmallVector<NamedDecl *, 8> Decls; + llvm::SetVector<NamedDecl *, SmallVector<NamedDecl *, 8> > Decls; for (paths_iterator Path = begin(), PathEnd = end(); Path != PathEnd; ++Path) - if (KnownDecls.insert(*Path->Decls.first)) - Decls.push_back(*Path->Decls.first); + Decls.insert(*Path->Decls.first); NumDeclsFound = Decls.size(); DeclsFound = new NamedDecl * [NumDeclsFound]; |