]> granicus.if.org Git - clang/commitdiff
[darwin] remove version number check when enabling -fobjc-subscripting-legacy-runtime
authorAlex Lorenz <arphaman@gmail.com>
Thu, 6 Dec 2018 02:44:23 +0000 (02:44 +0000)
committerAlex Lorenz <arphaman@gmail.com>
Thu, 6 Dec 2018 02:44:23 +0000 (02:44 +0000)
This subscripting feature actually works on older OS versions anyway.

rdar://36287065

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

lib/Driver/ToolChains/Clang.cpp
test/Driver/rewrite-legacy-objc.m

index 34e04c8da1511f5509ac4ea3f88770362ba1d31b..3ebf44080051de1327dbc73eb43df3fa8785427f 100644 (file)
@@ -2828,7 +2828,6 @@ static void RenderObjCOptions(const ToolChain &TC, const Driver &D,
   // When ObjectiveC legacy runtime is in effect on MacOSX, turn on the option
   // to do Array/Dictionary subscripting by default.
   if (Arch == llvm::Triple::x86 && T.isMacOSX() &&
-      !T.isMacOSXVersionLT(10, 7) &&
       Runtime.getKind() == ObjCRuntime::FragileMacOSX && Runtime.isNeXTFamily())
     CmdArgs.push_back("-fobjc-subscripting-legacy-runtime");
 
index 37b829e5e5a2beeb139f73f79982d199fa304c6e..6461aecfe5d9b63806b9d39661de780f83bf8a79 100644 (file)
@@ -10,4 +10,4 @@
 // RUN: %clang -no-canonical-prefixes -target i386-apple-macosx10.6.0 -rewrite-legacy-objc %s -o - -### 2>&1 | \
 // RUN:   FileCheck -check-prefix=TEST2 %s
 // TEST1: "-fmessage-length" "0" "-stack-protector" "1" "-fblocks" "-fencode-extended-block-signature" "-fregister-global-dtors-with-atexit" "-fobjc-runtime=macosx-fragile" "-fobjc-subscripting-legacy-runtime" "-fno-objc-infer-related-result-type" "-fobjc-exceptions" "-fmax-type-align=16" "-fdiagnostics-show-option"
-// TEST2: "-fmessage-length" "0" "-stack-protector" "1" "-fblocks" "-fencode-extended-block-signature" "-fregister-global-dtors-with-atexit" "-fobjc-runtime=macosx-fragile" "-fno-objc-infer-related-result-type" "-fobjc-exceptions" "-fmax-type-align=16" "-fdiagnostics-show-option"
+// TEST2: "-fmessage-length" "0" "-stack-protector" "1" "-fblocks" "-fencode-extended-block-signature" "-fregister-global-dtors-with-atexit" "-fobjc-runtime=macosx-fragile" "-fobjc-subscripting-legacy-runtime" "-fno-objc-infer-related-result-type" "-fobjc-exceptions" "-fmax-type-align=16" "-fdiagnostics-show-option"