[cfe-commits] r59173 - /cfe/trunk/include/clang/AST/TypeOrdering.h
Douglas Gregor
doug.gregor at gmail.com
Wed Nov 12 13:52:31 PST 2008
Author: dgregor
Date: Wed Nov 12 15:52:20 2008
New Revision: 59173
URL: http://llvm.org/viewvc/llvm-project?rev=59173&view=rev
Log:
Slightly improve type hash
Modified:
cfe/trunk/include/clang/AST/TypeOrdering.h
Modified: cfe/trunk/include/clang/AST/TypeOrdering.h
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/include/clang/AST/TypeOrdering.h?rev=59173&r1=59172&r2=59173&view=diff
==============================================================================
--- cfe/trunk/include/clang/AST/TypeOrdering.h (original)
+++ cfe/trunk/include/clang/AST/TypeOrdering.h Wed Nov 12 15:52:20 2008
@@ -42,7 +42,8 @@
}
static unsigned getHashValue(clang::QualType Val) {
- return (unsigned)Val.getAsOpaquePtr();
+ return (unsigned)Val.getAsOpaquePtr() ^
+ ((unsigned)Val.getAsOpaquePtr() >> 9);
}
static bool isEqual(clang::QualType LHS, clang::QualType RHS) {
More information about the cfe-commits
mailing list