[cfe-dev] codegening constants

Nuno Lopes nunoplopes at sapo.pt
Thu Aug 14 04:12:08 PDT 2008


> On Aug 13, 2008, at 8:12 PM, Eli Friedman wrote:
>
>> On Wed, Aug 13, 2008 at 4:17 PM, Nuno Lopes <nunoplopes at sapo.pt>  wrote:
>>> I've noticed that currently clang's codegen isn't marking some  consts 
>>> as
>>> llvm constants (e.g. const char[] = "foo").
>>> The attached patch fixes just that. As it adds some methods to  QualType 
>>> and
>>> Type classes, I'm sending to the list to get approval before  commit. So
>>> please comment on it! :)
>>
>> The getAsArrayType* methods were moved to ASTContext for a reason...
>> you shouldn't be moving them back.
>
> Yep, this change should not pass the regression test suite.  Nuno, did 
> you test it?

Yes, and it does pass the whole regression test suite (minus one test that 
was already failing).
Also, I didn't see any method in ASTContext that is appropriate to what I 
needed. getAsArrayType() in ASTContext are (in my understanding) to make new 
types, not to cast a Type* into an xxArrayType*.

Nuno 




More information about the cfe-dev mailing list