Home | History | Annotate | Download | only in ARCMT
      1 // RUN: rm -rf %t
      2 // RUN: %clang_cc1  -objcmt-migrate-readwrite-property -objcmt-migrate-readonly-property -mt-migrate-directory %t %s -x objective-c -fobjc-runtime-has-weak -fobjc-arc -triple x86_64-apple-darwin11
      3 // RUN: c-arcmt-test -mt-migrate-directory %t | arcmt-test -verify-transformed-files %s.result
      4 // RUN: %clang_cc1 -triple x86_64-apple-darwin10 -fsyntax-only -x objective-c -fobjc-runtime-has-weak -fobjc-arc %s.result
      5 // rdar://15300059
      6 
      7 
      8 #define __NSi_7_0 introduced=7.0
      9 #define __NSi_6_0 introduced=6.0
     10 
     11 #define CF_AVAILABLE(_mac, _ios) __attribute__((availability(ios,__NSi_##_ios)))
     12 #define CF_AVAILABLE_MAC(_mac) __attribute__((availability(macosx,__NSi_##_mac)))
     13 #define CF_AVAILABLE_IOS(_ios) __attribute__((availability(macosx,unavailable)))
     14 
     15 #define NS_AVAILABLE(_mac, _ios) CF_AVAILABLE(_mac, _ios)
     16 #define NS_AVAILABLE_MAC(_mac) CF_AVAILABLE_MAC(_mac)
     17 #define NS_AVAILABLE_IOS(_ios) CF_AVAILABLE_IOS(_ios)
     18 
     19 #define UNAVAILABLE __attribute__((unavailable("not available in automatic reference counting mode")))
     20 
     21 @interface MKMapItem
     22 - (MKMapItem *)source NS_AVAILABLE(10_9, 6_0);
     23 - (void)setSource:(MKMapItem *)source NS_AVAILABLE(10_9, 7_0);
     24 
     25 - (void)setDest:(MKMapItem *)source NS_AVAILABLE(10_9, 6_0);
     26 - (MKMapItem *)dest NS_AVAILABLE(10_9, 6_0);
     27 
     28 - (MKMapItem *)final;
     29 - (void)setFinal:(MKMapItem *)source;
     30 
     31 - (MKMapItem *)total NS_AVAILABLE(10_9, 6_0);
     32 - (void)setTotal:(MKMapItem *)source;
     33 
     34 - (MKMapItem *)comp NS_AVAILABLE(10_9, 6_0);
     35 - (void)setComp:(MKMapItem *)source UNAVAILABLE;
     36 
     37 - (MKMapItem *)tally  UNAVAILABLE NS_AVAILABLE(10_9, 6_0);
     38 - (void)setTally:(MKMapItem *)source UNAVAILABLE NS_AVAILABLE(10_9, 6_0);
     39 
     40 - (MKMapItem *)itally  NS_AVAILABLE(10_9, 6_0);
     41 - (void)setItally:(MKMapItem *)source UNAVAILABLE NS_AVAILABLE(10_9, 6_0);
     42 
     43 - (MKMapItem *)normal  UNAVAILABLE;
     44 - (void)setNormal:(MKMapItem *)source UNAVAILABLE NS_AVAILABLE(10_9, 6_0);
     45 @end
     46 
     47