]> granicus.if.org Git - clang/commitdiff
Switch a SmallPtrSet/SmallVector pair over to SetVector.
authorDouglas Gregor <dgregor@apple.com>
Tue, 11 Sep 2012 07:19:42 +0000 (07:19 +0000)
committerDouglas Gregor <dgregor@apple.com>
Tue, 11 Sep 2012 07:19:42 +0000 (07:19 +0000)
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@163600 91177308-0d34-0410-b5e6-96231b3b80d8

lib/AST/CXXInheritance.cpp

index 3884e4e857395220c1cfb4fcfd3646e002a0d472..d1eb2b11d1c8df083866ea44f84a537e30278a53 100644 (file)
@@ -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];