[cfe-commits] r149565 - in /cfe/trunk: lib/Lex/PPMacroExpansion.cpp test/SemaObjC/default-synthesize.m

Fariborz Jahanian fjahanian at apple.com
Wed Feb 1 16:15:52 PST 2012


Author: fjahanian
Date: Wed Feb  1 18:15:51 2012
New Revision: 149565

URL: http://llvm.org/viewvc/llvm-project?rev=149565&view=rev
Log:
objc2: add __has_feature(objc_default_synthesize_properties).
// rdar://10770497

Modified:
    cfe/trunk/lib/Lex/PPMacroExpansion.cpp
    cfe/trunk/test/SemaObjC/default-synthesize.m

Modified: cfe/trunk/lib/Lex/PPMacroExpansion.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/Lex/PPMacroExpansion.cpp?rev=149565&r1=149564&r2=149565&view=diff
==============================================================================
--- cfe/trunk/lib/Lex/PPMacroExpansion.cpp (original)
+++ cfe/trunk/lib/Lex/PPMacroExpansion.cpp Wed Feb  1 18:15:51 2012
@@ -616,6 +616,7 @@
            .Case("objc_arc", LangOpts.ObjCAutoRefCount)
            .Case("objc_arc_weak", LangOpts.ObjCAutoRefCount && 
                  LangOpts.ObjCRuntimeHasWeak)
+           .Case("objc_default_synthesize_properties", LangOpts.ObjC2)
            .Case("objc_fixed_enum", LangOpts.ObjC2)
            .Case("objc_instancetype", LangOpts.ObjC2)
            .Case("objc_modules", LangOpts.ObjC2 && LangOpts.Modules)

Modified: cfe/trunk/test/SemaObjC/default-synthesize.m
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/test/SemaObjC/default-synthesize.m?rev=149565&r1=149564&r2=149565&view=diff
==============================================================================
--- cfe/trunk/test/SemaObjC/default-synthesize.m (original)
+++ cfe/trunk/test/SemaObjC/default-synthesize.m Wed Feb  1 18:15:51 2012
@@ -10,7 +10,9 @@
 @end
 
 @implementation SynthItAll
-//@synthesize howMany, what;
+#if !__has_feature(objc_default_synthesize_properties)
+ at synthesize howMany, what;
+#endif
 @end
 
 
@@ -20,7 +22,9 @@
 @end
 
 @implementation SynthSetter
-//@synthesize howMany, what;
+#if !__has_feature(objc_default_synthesize_properties)
+ at synthesize howMany, what;
+#endif
 
 - (int) howMany {
     return self.howMany;
@@ -40,7 +44,9 @@
 @end
 
 @implementation SynthGetter
-//@synthesize howMany, what;
+#if !__has_feature(objc_default_synthesize_properties)
+ at synthesize howMany, what;
+#endif
 
 // - (int) howMany
 - (void) setHowMany: (int) value {
@@ -61,7 +67,9 @@
 @end
 
 @implementation SynthNone
-//@synthesize howMany, what;  // REM: Redundant anyway
+#if !__has_feature(objc_default_synthesize_properties)
+ at synthesize howMany, what;  // REM: Redundant anyway
+#endif
 
 - (int) howMany {
     return self.howMany;
@@ -112,7 +120,9 @@
 
 @implementation D
 - (int) Meth { return self.PROP; }
+#if __has_feature(objc_default_synthesize_properties)
 @synthesize PROP=IVAR;
+#endif
 @end
 
 // rdar://10567333





More information about the cfe-commits mailing list