Out of curiosity, was this motivated by a test case? Should we care about monitoring performance of this?
- Daniel On Wed, Nov 12, 2008 at 1:52 PM, Douglas Gregor <[EMAIL PROTECTED]> wrote: > 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) { > > > _______________________________________________ > cfe-commits mailing list > [email protected] > http://lists.cs.uiuc.edu/mailman/listinfo/cfe-commits > _______________________________________________ cfe-commits mailing list [email protected] http://lists.cs.uiuc.edu/mailman/listinfo/cfe-commits
