~itachi-san/telegram-desktop/gyp

« back to all changes in this revision

Viewing changes to test/mac/objc-arc/m-file-arc-weak.m

  • Committer: Mark Mentovai
  • Author(s): Tobias Hahn
  • Date: 2020-05-12 14:59:53 UTC
  • Revision ID: git-v1:caa60026e223fc501e8b337fd5086ece4028b1c6
Add support for CLANG_ENABLE_OBJC_WEAK

When enabled, ARC-style weak references can be used in Objective-C and
Objective-C++ code that uses manual retain release semantics instead of
automatic reference counting.

This feature is supported in Xcode 8.1 and newer.

Change-Id: Ic28a34c8ed8824ce69041c612fab6d960681f5d4
Reviewed-on: https://chromium-review.googlesource.com/c/external/gyp/+/2195383
Reviewed-by: Mark Mentovai <mark@chromium.org>

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
#if __has_feature(objc_arc)
 
2
#error "ObjC files without CLANG_ENABLE_OBJC_ARC should not be ARC'd!"
 
3
#endif
 
4
 
 
5
#if !__has_feature(objc_arc_weak)
 
6
#error "With CLANG_ENABLE_OBJC_WEAK, weak references should be enabled."
 
7
#endif
 
8
 
 
9
void m_fun() {}