[cfe-commits] [Review] Rolling out ASTContext::getTypeSizeInChars()

Ken Dyck Ken.Dyck at onsemi.com
Mon Jan 11 04:52:59 PST 2010


 

On Saturday, January 09, 2010 5:05 PM, Chris Lattner wrote:
> 
> On Jan 4, 2010, at 11:08 AM, Ken Dyck wrote:
> 
> > 
> > The attached patches replace occurrences of 
> > ASTContext::getTypeSize()/8 with ASTContext::getTypeSizeInChars(),  
> > converting [u]int64_t variables to CharUnits ones where it seems 
> > appropriate. No functional changes are intended. The 
> changes touch the 
> > AST, Analysis, Sema, and CodeGen libraries and are split 
> into patches accordingly.
> 
> Sorry for the delay, this code looks great to me.  The only 
> thing that I don't like is the name 'getRaw()'.  How about 
> just 'getValue()' or getAmount()?

Sure. How about getQuantity(), in keeping with terminology already used
in CharUnits.h? I suppose it would make sense to similarly rename
fromRaw() and RawType then, too. If it's all the same to you, I'd like
to do this renaming in a follow-up commit as it seems independent of the
roll-out of getTypeSizeInChars(). 

-Ken




More information about the cfe-commits mailing list