diff options
| author | Craig Topper <craig.topper@gmail.com> | 2013-07-05 04:43:31 +0000 |
|---|---|---|
| committer | Craig Topper <craig.topper@gmail.com> | 2013-07-05 04:43:31 +0000 |
| commit | 3598eb7ebaee639b577863db3d7879d753230504 (patch) | |
| tree | 6ae98ebf00ffa15b095b5d49ee81e09afb46c99c | |
| parent | 79be4cdd2d5a7c9c686ed630b154a560fa39779e (diff) | |
| download | bcm5719-llvm-3598eb7ebaee639b577863db3d7879d753230504.tar.gz bcm5719-llvm-3598eb7ebaee639b577863db3d7879d753230504.zip | |
Use typedef for Densemap contraining SmallVector passed to a function to avoid repeating SmallVector size.
llvm-svn: 185683
| -rw-r--r-- | clang/lib/Serialization/ASTReader.cpp | 10 |
1 files changed, 4 insertions, 6 deletions
diff --git a/clang/lib/Serialization/ASTReader.cpp b/clang/lib/Serialization/ASTReader.cpp index 171b053f2f7..8c8831a14bb 100644 --- a/clang/lib/Serialization/ASTReader.cpp +++ b/clang/lib/Serialization/ASTReader.cpp @@ -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 |

