On Fri, 12 Feb 2010 03:41:31 -0000, John McCall <[email protected]> wrote: > Author: rjmccall > Date: Thu Feb 11 21:41:30 2010 > New Revision: 95964 > > URL: http://llvm.org/viewvc/llvm-project?rev=95964&view=rev > Log: > Waste two bits in every clang::Type so that the type class can be read > in a single byte-load rather than some crazy bitmunging operation. > > ============================================================================== > --- cfe/trunk/include/clang/AST/Type.h (original) > +++ cfe/trunk/include/clang/AST/Type.h Thu Feb 11 21:41:30 2010 > @@ -751,24 +751,22 @@ > public: > enum TypeClass { > #define TYPE(Class, Base) Class, > +#define LAST_TYPE(Class) TypeLast = Class, > #define ABSTRACT_TYPE(Class, Base) > #include "clang/AST/TypeNodes.def"
How about + TypeBeyondLast, + TypeLast = TypeBeyondLast - 1, and leaving TypeNodes.def alone? > /// TypeClass bitfield - Enum that specifies what subclass this belongs > to. > + unsigned TC : 8; > + We might want a static assertion that TypeLast < (1<<8). Sebastian _______________________________________________ cfe-commits mailing list [email protected] http://lists.cs.uiuc.edu/mailman/listinfo/cfe-commits
