[cfe-dev] Constant CFString merge
csdavec at swansea.ac.uk
Fri Aug 15 12:17:29 PDT 2008
On 15 Aug 2008, at 19:59, Daniel Dunbar wrote:
> One problem here is how to handle emission of constant CFStrings when
> not in Objective-C mode.
> I don't really want to always have a CGObjCRuntime object around,
> the runtime is likely to want to add data to the module which
> should only
> happen for ObjC files, and conditionalizing this in the
> CGObjCRuntime is
> somewhat gross.
I can't speak for the Apple Runtime, but the GNU and Étoilé runtime
backends only emit stuff for Objective-C features that are used. If
you compile a file as a .c or .m file you will get the same results.
For Objective-C strings in the GNU runtime, this will emit a hook
into the runtime library because it allows you to replace the
constant string class at load time. If the NeXT runtime uses a
constant symbol to do this then it should not emit anything Objective-
C specific if you just use the constant Objective-C string method.
More information about the cfe-dev