[cfe-commits] [Review] rollingout ASTContext::getTypeSizeInBytes()
Ken Dyck
Ken.Dyck at onsemi.com
Wed Nov 25 07:14:10 PST 2009
On Tuesday, November 24, 2009 5:13 PM, John McCall wrote:
> Ted Kremenek wrote:
> > I agree with John. If we're rolling out a new API why not
> introduce
> > now a new type that adds the "dimensionality" of the value? (bytes
> > versus bits)
> >
> > John: Is that what you meant?
>
> Yeah. I am fairly skeptical of this feature surviving
> correctly otherwise.
Okay. I'll take a stab at implementing this.
As I understand it, these are the changes that need to happen:
1. Remove the recently added ASTContext::getByteSize() and
ASTContext::getTypeSizeInBytes().
2. Add a new class (named TypeSize, say) that has two methods: inBits()
and inBytes().
3. Change the return type of ASTContext::getTypeSize() from uint64_t to
TypeSize.
4. Update all calls to getTypeSize() to explicity choose the bit or byte
size.
Is this what you had in mind?
-Ken
More information about the cfe-commits
mailing list