[cfe-dev] __has_feature() for the non-fragile ABI

Fariborz Jahanian fjahanian at apple.com
Mon Aug 31 09:42:24 PDT 2009


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.

- Fariborz

>
>
> David
> <clang.diff>_______________________________________________
> cfe-dev mailing list
> cfe-dev at cs.uiuc.edu
> http://lists.cs.uiuc.edu/mailman/listinfo/cfe-dev




More information about the cfe-dev mailing list