[cfe-dev] Objc Apple Runtime and constant strings

Jean-Daniel Dupas devlists at shadowlab.org
Tue Aug 12 16:37:25 PDT 2008



Le 13 août 08 à 01:23, David Chisnall a écrit :
> On 13 Aug 2008, at 00:13, Jean-Daniel Dupas wrote:
>
>> Just a question.
>>
>> I saw a patch commited today to add support for constant strings in
>> the Apple runtime. Is there a reason to reimplement the constant
>> string generation and not simply call  GetAddrOfConstantCFString ?
>>
>> llvm::Constant *CGObjCMac::GenerateConstantString(const std::string
>> &String) {
>> 	return CGM:: GetAddrOfConstantCFString(String);
>> }
>
> When I factored constant strings out into the runtime-specific code,  
> I left a note above GetAddrOfConstantCFString saying it should be  
> moved into an Apple runtime class when one existed.  I don't know  
> why this was not done.
>
> David
>

Maybe because constant CFString are not part of the obj-c runtime, and  
does not require an obj-c module to be generated (they work in plain c  
file too).





More information about the cfe-dev mailing list