[cfe-commits] r155570 - /cfe/trunk/include/clang/AST/CXXInheritance.h

Benjamin Kramer benny.kra at googlemail.com
Wed Apr 25 11:21:22 PDT 2012


Author: d0k
Date: Wed Apr 25 13:21:21 2012
New Revision: 155570

URL: http://llvm.org/viewvc/llvm-project?rev=155570&view=rev
Log:
Convert a std::map that usually has between 0 and 10 elements to SmallMap.

Modified:
    cfe/trunk/include/clang/AST/CXXInheritance.h

Modified: cfe/trunk/include/clang/AST/CXXInheritance.h
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/include/clang/AST/CXXInheritance.h?rev=155570&r1=155569&r2=155570&view=diff
==============================================================================
--- cfe/trunk/include/clang/AST/CXXInheritance.h (original)
+++ cfe/trunk/include/clang/AST/CXXInheritance.h Wed Apr 25 13:21:21 2012
@@ -19,7 +19,7 @@
 #include "clang/AST/DeclCXX.h"
 #include "clang/AST/Type.h"
 #include "clang/AST/TypeOrdering.h"
-#include "llvm/ADT/DenseMap.h"
+#include "llvm/ADT/SmallMap.h"
 #include "llvm/ADT/SmallSet.h"
 #include "llvm/ADT/SmallVector.h"
 #include <list>
@@ -128,8 +128,7 @@
   /// while the element contains the number of non-virtual base
   /// class subobjects for that class type. The key of the map is
   /// the cv-unqualified canonical type of the base class subobject.
-  std::map<QualType, std::pair<bool, unsigned>, QualTypeOrdering>
-    ClassSubobjects;
+  llvm::SmallMap<QualType, std::pair<bool, unsigned>, 8> ClassSubobjects;
   
   /// FindAmbiguities - Whether Sema::IsDerivedFrom should try find
   /// ambiguous paths while it is looking for a path from a derived





More information about the cfe-commits mailing list