summaryrefslogtreecommitdiffstats
path: root/clang/lib/AST/CXXInheritance.cpp
diff options
context:
space:
mode:
authorDouglas Gregor <dgregor@apple.com>2012-09-11 07:19:42 +0000
committerDouglas Gregor <dgregor@apple.com>2012-09-11 07:19:42 +0000
commit18e1b52964f814753bc49cc9cbb7bb2e56a36cf8 (patch)
tree662862babbbcb43978e9ec2b2bc016bfb4a87850 /clang/lib/AST/CXXInheritance.cpp
parent521d32dd969bd799582877c8f5bbaf0a5e2e7c28 (diff)
downloadbcm5719-llvm-18e1b52964f814753bc49cc9cbb7bb2e56a36cf8.tar.gz
bcm5719-llvm-18e1b52964f814753bc49cc9cbb7bb2e56a36cf8.zip
Switch a SmallPtrSet/SmallVector pair over to SetVector.
llvm-svn: 163600
Diffstat (limited to 'clang/lib/AST/CXXInheritance.cpp')
-rw-r--r--clang/lib/AST/CXXInheritance.cpp7
1 files changed, 3 insertions, 4 deletions
diff --git a/clang/lib/AST/CXXInheritance.cpp b/clang/lib/AST/CXXInheritance.cpp
index 3884e4e8573..d1eb2b11d1c 100644
--- a/clang/lib/AST/CXXInheritance.cpp
+++ b/clang/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];
OpenPOWER on IntegriCloud