[cfe-commits] r155571 - /cfe/trunk/include/clang/AST/DeclContextInternals.h
Benjamin Kramer
benny.kra at googlemail.com
Wed Apr 25 11:21:27 PDT 2012
Author: d0k
Date: Wed Apr 25 13:21:27 2012
New Revision: 155571
URL: http://llvm.org/viewvc/llvm-project?rev=155571&view=rev
Log:
Use a SmallMap for StoredDeclsMap, it's usually sparsely populated so we can avoid initializing memory for 64 buckets.
Modified:
cfe/trunk/include/clang/AST/DeclContextInternals.h
Modified: cfe/trunk/include/clang/AST/DeclContextInternals.h
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/include/clang/AST/DeclContextInternals.h?rev=155571&r1=155570&r2=155571&view=diff
==============================================================================
--- cfe/trunk/include/clang/AST/DeclContextInternals.h (original)
+++ cfe/trunk/include/clang/AST/DeclContextInternals.h Wed Apr 25 13:21:27 2012
@@ -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);
More information about the cfe-commits
mailing list