[cfe-dev] __has_feature() for the non-fragile ABI
Chris Lattner
clattner at apple.com
Mon Aug 31 09:45:03 PDT 2009
On Aug 31, 2009, at 9:42 AM, Fariborz Jahanian wrote:
>
> On Aug 30, 2009, at 9:14 AM, David Chisnall wrote:
>
>> Hi,
>>
>> This tiny patch adds a __has_feature(objc_nonfragile_abi) when
>> compiling with -fobjc-nonfragile-abi. This lets us hide instance
>> variables in headers from the compiler when compiling with the non-
>> fragile ABI or even hard-error when we are not if the header does
>> not define ivars and so will break with the fragile ABI.
>>
>> I was wondering slightly about whether we should be able to
>> automatically generate some of these. Currently this and
>> __has_feature(blocks) are the only two that are dependent on
>> language options, but possibly in future we might want to add the
>> means to automatically map certain options to __has_feature()
>> definitions.
>>
>> Any objections if I commit this?
>
> OK with me. Please add a test case.
I agree, thanks!
-Chris
More information about the cfe-dev
mailing list