Use a SmallMap for StoredDeclsMap, it's usually sparsely populated so we can avoid...
authorBenjamin Kramer <benny.kra@googlemail.com>
Wed, 25 Apr 2012 18:21:27 +0000 (18:21 +0000)
committerBenjamin Kramer <benny.kra@googlemail.com>
Wed, 25 Apr 2012 18:21:27 +0000 (18:21 +0000)
llvm-svn: 155571

clang/include/clang/AST/DeclContextInternals.h

index c5f2aa0..9a70f9d 100644 (file)
@@ -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);