From 8ae63875f4b078f5303ca7a19cba82fbc8a603c2 Mon Sep 17 00:00:00 2001 From: Craig Topper Date: Fri, 5 Jul 2013 04:43:31 +0000 Subject: [PATCH] Use typedef for Densemap contraining SmallVector passed to a function to avoid repeating SmallVector size. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@185683 91177308-0d34-0410-b5e6-96231b3b80d8 --- lib/Serialization/ASTReader.cpp | 10 ++++------ 1 file changed, 4 insertions(+), 6 deletions(-) diff --git a/lib/Serialization/ASTReader.cpp b/lib/Serialization/ASTReader.cpp index 171b053f2f..8c8831a14b 100644 --- a/lib/Serialization/ASTReader.cpp +++ b/lib/Serialization/ASTReader.cpp @@ -210,6 +210,8 @@ bool PCHValidator::ReadTargetOptions(const TargetOptions &TargetOpts, namespace { typedef llvm::StringMap > MacroDefinitionsMap; + typedef llvm::DenseMap > + DeclsMap; } /// \brief Collect the macro definitions provided by the given preprocessor @@ -5812,15 +5814,13 @@ namespace { class DeclContextAllNamesVisitor { ASTReader &Reader; SmallVectorImpl &Contexts; - llvm::DenseMap > &Decls; + DeclsMap &Decls; bool VisitAll; public: DeclContextAllNamesVisitor(ASTReader &Reader, SmallVectorImpl &Contexts, - llvm::DenseMap > &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 > - DeclsMap; DeclsMap Decls; // Compute the declaration contexts we need to look into. Multiple such -- 2.40.0