diff options
author | Benjamin Kramer <benny.kra@googlemail.com> | 2012-04-25 18:21:27 +0000 |
---|---|---|
committer | Benjamin Kramer <benny.kra@googlemail.com> | 2012-04-25 18:21:27 +0000 |
commit | 0d62709c6e9b33dce788e0c0fa3cd5c7f4d637d0 (patch) | |
tree | 41079e71da21ba3f728d39f822ce6ea43520462d | |
parent | 383fdf9b8359cf8192026e584da7143bb72301c1 (diff) |
Use a SmallMap for StoredDeclsMap, it's usually sparsely populated so we can avoid initializing memory for 64 buckets.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@155571 91177308-0d34-0410-b5e6-96231b3b80d8
-rw-r--r-- | include/clang/AST/DeclContextInternals.h | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/include/clang/AST/DeclContextInternals.h b/include/clang/AST/DeclContextInternals.h index c5f2aa0b84..9a70f9d405 100644 --- a/include/clang/AST/DeclContextInternals.h +++ b/include/clang/AST/DeclContextInternals.h @@ -17,8 +17,8 @@ #include "clang/AST/Decl.h" #include "clang/AST/DeclarationName.h" #include "clang/AST/DeclCXX.h" -#include "llvm/ADT/DenseMap.h" #include "llvm/ADT/PointerUnion.h" +#include "llvm/ADT/SmallMap.h" #include "llvm/ADT/SmallVector.h" #include <algorithm> @@ -196,7 +196,7 @@ public: }; class StoredDeclsMap - : public llvm::DenseMap<DeclarationName, StoredDeclsList> { + : public llvm::SmallMap<DeclarationName, StoredDeclsList, 4> { public: static void DestroyAll(StoredDeclsMap *Map, bool Dependent); |