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
diff --git a/include/clang/AST/DeclContextInternals.h b/include/clang/AST/DeclContextInternals.h
index c5f2aa0..9a70f9d 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 @@
};
class StoredDeclsMap
- : public llvm::DenseMap<DeclarationName, StoredDeclsList> {
+ : public llvm::SmallMap<DeclarationName, StoredDeclsList, 4> {
public:
static void DestroyAll(StoredDeclsMap *Map, bool Dependent);