]> granicus.if.org Git - clang/commitdiff
Inline DenseMapInfo<clang::DeclarationName>::getHashValue() for a 0.4% speedup on...
authorDouglas Gregor <dgregor@apple.com>
Thu, 3 May 2012 23:28:32 +0000 (23:28 +0000)
committerDouglas Gregor <dgregor@apple.com>
Thu, 3 May 2012 23:28:32 +0000 (23:28 +0000)
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@156129 91177308-0d34-0410-b5e6-96231b3b80d8

include/clang/AST/DeclarationName.h
lib/AST/DeclarationName.cpp

index 928a85c63bf91b93337c83cfaf371797a857ff60..1548a8953a553c889998e19c4876dd10c0e24c35 100644 (file)
@@ -570,7 +570,9 @@ struct DenseMapInfo<clang::DeclarationName> {
     return clang::DeclarationName::getTombstoneMarker();
   }
 
-  static unsigned getHashValue(clang::DeclarationName);
+  static unsigned getHashValue(clang::DeclarationName Name) {
+    return DenseMapInfo<void*>::getHashValue(Name.getAsOpaquePtr());
+  }
 
   static inline bool
   isEqual(clang::DeclarationName LHS, clang::DeclarationName RHS) {
index 324a2cbf856ef07fd96a710386cd2087c9983779..895cd5193a072830738dc7405d1bf923eaa3bd78 100644 (file)
@@ -481,12 +481,6 @@ DeclarationNameTable::getCXXLiteralOperatorName(IdentifierInfo *II) {
   return DeclarationName(LiteralName);
 }
 
-unsigned
-llvm::DenseMapInfo<clang::DeclarationName>::
-getHashValue(clang::DeclarationName N) {
-  return DenseMapInfo<void*>::getHashValue(N.getAsOpaquePtr());
-}
-
 DeclarationNameLoc::DeclarationNameLoc(DeclarationName Name) {
   switch (Name.getNameKind()) {
   case DeclarationName::Identifier: