Inline DenseMapInfo<clang::DeclarationName>::getHashValue() for a 0.4% speedup on <rdar://problem/11004361>

llvm-svn: 156129
This commit is contained in:
Douglas Gregor 2012-05-03 23:28:32 +00:00
parent 28fb4fc91b
commit 1798cd797b
2 changed files with 3 additions and 7 deletions

View 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) {

View 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: