]> granicus.if.org Git - clang/commitdiff
Fix which Darwin versions have ObjC runtime with full subscripting support.
authorVolodymyr Sapsai <vsapsai@apple.com>
Mon, 26 Feb 2018 23:10:23 +0000 (23:10 +0000)
committerVolodymyr Sapsai <vsapsai@apple.com>
Mon, 26 Feb 2018 23:10:23 +0000 (23:10 +0000)
Update min deployment target in some tests so that they don't try
to link against libarclite and don't fail when it's not available.

rdar://problem/29253617

Reviewers: vsk, kubamracek

Reviewed By: vsk

Subscribers: jkorous-apple, cfe-commits

Differential Revision: https://reviews.llvm.org/D43787

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@326145 91177308-0d34-0410-b5e6-96231b3b80d8

include/clang/Basic/ObjCRuntime.h
test/Driver/arclite-link.c

index 8dc259c7ab66f8d58b71e15f3c9d14cbf54c3241..3926c0c9b72b2f3e5ba0ec097ff3c1f8f0a1e9a1 100644 (file)
@@ -207,8 +207,8 @@ public:
   bool hasSubscripting() const {
     switch (getKind()) {
     case FragileMacOSX: return false;
-    case MacOSX: return getVersion() >= VersionTuple(10, 8);
-    case iOS: return getVersion() >= VersionTuple(6);
+    case MacOSX: return getVersion() >= VersionTuple(10, 11);
+    case iOS: return getVersion() >= VersionTuple(9);
     case WatchOS: return true;
 
     // This is really a lie, because some implementations and versions
index 3471bf6516a26ceca27ec9a1a9db33674097e6f4..2cc0271fc022267e2f5a02f390b2306bf2352276 100644 (file)
@@ -1,6 +1,6 @@
 // RUN: touch %t.o
-// RUN: %clang -### -target x86_64-apple-darwin10 -fobjc-link-runtime -lfoo -mmacosx-version-min=10.7 %t.o 2>&1 | FileCheck -check-prefix=CHECK-ARCLITE-OSX %s
-// RUN: %clang -### -target x86_64-apple-darwin10 -fobjc-link-runtime -mmacosx-version-min=10.8 %t.o 2>&1 | FileCheck -check-prefix=CHECK-NOARCLITE %s
+// RUN: %clang -### -target x86_64-apple-darwin10 -fobjc-link-runtime -lfoo -mmacosx-version-min=10.10 %t.o 2>&1 | FileCheck -check-prefix=CHECK-ARCLITE-OSX %s
+// RUN: %clang -### -target x86_64-apple-darwin10 -fobjc-link-runtime -mmacosx-version-min=10.11 %t.o 2>&1 | FileCheck -check-prefix=CHECK-NOARCLITE %s
 // RUN: %clang -### -target i386-apple-darwin10 -fobjc-link-runtime -mmacosx-version-min=10.7 %t.o 2>&1 | FileCheck -check-prefix=CHECK-NOARCLITE %s
 // RUN: %clang -### -target x86_64-apple-darwin10 -fobjc-link-runtime -nostdlib %t.o 2>&1 | FileCheck -check-prefix=CHECK-NOSTDLIB %s
 
@@ -12,6 +12,6 @@
 // CHECK-NOARCLITE-NOT: libarclite
 // CHECK-NOSTDLIB-NOT: -lobjc
 
-// RUN: %clang -### -target x86_64-apple-darwin10 -fobjc-link-runtime -fobjc-arc -mmacosx-version-min=10.7 %s 2>&1 | FileCheck -check-prefix=CHECK-UNUSED %s
+// RUN: %clang -### -target x86_64-apple-darwin10 -fobjc-link-runtime -fobjc-arc -mmacosx-version-min=10.10 %s 2>&1 | FileCheck -check-prefix=CHECK-UNUSED %s
 
 // CHECK-UNUSED-NOT: warning: argument unused during compilation: '-fobjc-link-runtime'