[cfe-dev] Adding access to array size expressions in ConstantArrayType.
Chris Lattner
clattner at apple.com
Mon Jun 15 18:00:13 PDT 2009
On Jun 15, 2009, at 1:55 PM, Enea Zaffanella wrote:
> Overall, there are 1072 array type declarations. Of these, 588 have a
> decimal unsuffixed integer literal as size expression; some other 72
> have a single macro name as size expression, which might be expanded
> to
> such a "canonical" integer constant.
>
> All considered, you are basically right in saying that the
> optimization
> is not worth the effort. So, if you say it is OK, we will proceed as
> you
> suggested and add the original size expression pointer
> unconditionally.
That makes sense to me. One other request: please make the non-
canonical ConstantArrayType and the canonical ConstantArrayType have a
different class name. The canonical one should be our current
ConstantArrayType that has an APInt for the size. I'd recommend
naming the new one ConstantArrayWithExprType or something like that.
While you're at it, you can put SourceLocation's for the [ and ] in
there too :)
-Chris
More information about the cfe-dev
mailing list