[cfe-commits] r146552 - in /cfe/trunk: lib/Driver/ToolChains.h test/Driver/darwin-iphone-defaults.m

Bob Wilson bob.wilson at apple.com
Tue Dec 13 22:08:25 PST 2011


Author: bwilson
Date: Wed Dec 14 00:08:25 2011
New Revision: 146552

URL: http://llvm.org/viewvc/llvm-project?rev=146552&view=rev
Log:
Enable stack protectors by default for iOS.  <rdar://problem/8836680>

Modified:
    cfe/trunk/lib/Driver/ToolChains.h
    cfe/trunk/test/Driver/darwin-iphone-defaults.m

Modified: cfe/trunk/lib/Driver/ToolChains.h
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/Driver/ToolChains.h?rev=146552&r1=146551&r2=146552&view=diff
==============================================================================
--- cfe/trunk/lib/Driver/ToolChains.h (original)
+++ cfe/trunk/lib/Driver/ToolChains.h Wed Dec 14 00:08:25 2011
@@ -359,7 +359,7 @@
   virtual unsigned GetDefaultStackProtectorLevel(bool KernelOrKext) const {
     // Stack protectors default to on for user code on 10.5,
     // and for everything in 10.6 and beyond
-    return !isTargetIPhoneOS() &&
+    return isTargetIPhoneOS() ||
       (!isMacosxVersionLT(10, 6) ||
          (!isMacosxVersionLT(10, 5) && !KernelOrKext));
   }

Modified: cfe/trunk/test/Driver/darwin-iphone-defaults.m
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/test/Driver/darwin-iphone-defaults.m?rev=146552&r1=146551&r2=146552&view=diff
==============================================================================
--- cfe/trunk/test/Driver/darwin-iphone-defaults.m (original)
+++ cfe/trunk/test/Driver/darwin-iphone-defaults.m Wed Dec 14 00:08:25 2011
@@ -1,8 +1,6 @@
 // RUN: %clang -ccc-host-triple i386-apple-darwin9 -miphoneos-version-min=3.0 -arch armv7 -flto -S -o - %s | FileCheck %s
 
-// CHECK: @f0
-// CHECK-NOT: ssp
-// CHECK: ) {
+// CHECK: @f0() ssp
 // CHECK: @__f0_block_invoke
 // CHECK: void @f1
 // CHECK-NOT: msgSend_fixup_alloc





More information about the cfe-commits mailing list