Re: Predefined macro for ARC
Re: Predefined macro for ARC
- Subject: Re: Predefined macro for ARC
- From: Ken Thomases <email@hidden>
- Date: Thu, 18 Aug 2011 10:00:49 -0500
On Aug 18, 2011, at 8:49 AM, Jon Gary wrote:
> Is there a predefined macro in clang for ARC to conditionally compile edits for ARC?
Quoting Greg Parker from the devforums:
The LLVM Compiler's checks are called __has_feature. ARC is one of the features you can check for.
#ifndef __has_feature
// not LLVM Compiler
#define __has_feature(x) 0
#endif
#if __has_feature(objc_arc)
// compiling with ARC
#else
// compiling without ARC
#endif
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Xcode-users mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden