[cfe-dev] Bug Patch for MSVC

Hartmut Kaiser hartmut.kaiser at gmail.com
Sun Sep 23 18:05:08 PDT 2007


Done.

Regards Hartmut 

> -----Original Message-----
> From: Chris Lattner [mailto:clattner at apple.com] 
> Sent: Wednesday, September 19, 2007 1:49 PM
> To: hartmut.kaiser at gmail.com
> Cc: 'Cédric Venet'; cfe-dev at cs.uiuc.edu
> Subject: Re: [cfe-dev] Bug Patch for MSVC
> 
> 
> On Sep 19, 2007, at 11:38 AM, Hartmut Kaiser wrote:
> 
> > Chris,
> >
> >>>     QualType CanonicalType;
> >>>
> >>>    /// TypeClass bitfield - Enum that specifies what 
> subclass this 
> >>> belongs to.
> >>>    /// Note that this should stay at the end of the ivars
> >> for Type so
> >>> that
> >>>    /// subclasses can pack their bitfields into the same word.
> >>>    TypeClass TC : 4;
> >>>
> >>> another alternative is to make the TC bit field 5 bits
> >> wide. This is
> >>> the choice llvm made in one of is class.
> >>
> >> I'd suggest changing getTypeClass() to do the appropriate masking.
> >
> > FWIW, that's exactly what I did a couple of days ago.
> > Are there other places in clang where bitmasks are used?
> 
> The specific sticking issue seems to be enum bitfields.  The 
> other solution would be to declare TC as:
> 
>   unsigned TC : 4;
> 
> and then return (TypeClass)TC;  in getTypeClass().  This is 
> probably the cleanest solution.
> 
> -Chris
> 





More information about the cfe-dev mailing list