]> granicus.if.org Git - clang/commitdiff
Use typedef for Densemap contraining SmallVector passed to a function to avoid repeat...
authorCraig Topper <craig.topper@gmail.com>
Fri, 5 Jul 2013 04:43:31 +0000 (04:43 +0000)
committerCraig Topper <craig.topper@gmail.com>
Fri, 5 Jul 2013 04:43:31 +0000 (04:43 +0000)
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@185683 91177308-0d34-0410-b5e6-96231b3b80d8

lib/Serialization/ASTReader.cpp

index 171b053f2f783b73236b213b8b71dcf7aa956c8f..8c8831a14bb65041e7430f9c2d280f5523c16dce 100644 (file)
@@ -210,6 +210,8 @@ bool PCHValidator::ReadTargetOptions(const TargetOptions &TargetOpts,
 namespace {
   typedef llvm::StringMap<std::pair<StringRef, bool /*IsUndef*/> >
     MacroDefinitionsMap;
+  typedef llvm::DenseMap<DeclarationName, SmallVector<NamedDecl *, 8> >
+    DeclsMap;
 }
 
 /// \brief Collect the macro definitions provided by the given preprocessor
@@ -5812,15 +5814,13 @@ namespace {
   class DeclContextAllNamesVisitor {
     ASTReader &Reader;
     SmallVectorImpl<const DeclContext *> &Contexts;
-    llvm::DenseMap<DeclarationName, SmallVector<NamedDecl *, 8> > &Decls;
+    DeclsMap &Decls;
     bool VisitAll;
 
   public:
     DeclContextAllNamesVisitor(ASTReader &Reader,
                                SmallVectorImpl<const DeclContext *> &Contexts,
-                               llvm::DenseMap<DeclarationName,
-                                           SmallVector<NamedDecl *, 8> > &Decls,
-                                bool VisitAll)
+                               DeclsMap &Decls, bool VisitAll)
       : Reader(Reader), Contexts(Contexts), Decls(Decls), VisitAll(VisitAll) { }
 
     static bool visit(ModuleFile &M, void *UserData) {
@@ -5871,8 +5871,6 @@ namespace {
 void ASTReader::completeVisibleDeclsMap(const DeclContext *DC) {
   if (!DC->hasExternalVisibleStorage())
     return;
-  typedef llvm::DenseMap<DeclarationName, SmallVector<NamedDecl *, 8> >
-    DeclsMap;
   DeclsMap Decls;
 
   // Compute the declaration contexts we need to look into. Multiple such