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

David Chisnall csdavec at swansea.ac.uk
Sun Aug 30 09:14:09 PDT 2009


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?

David
-------------- next part --------------
A non-text attachment was scrubbed...
Name: clang.diff
Type: application/octet-stream
Size: 556 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/cfe-dev/attachments/20090830/88df2414/attachment.obj>


More information about the cfe-dev mailing list