diff options
| author | Bob Wilson <bob.wilson@apple.com> | 2011-12-14 06:08:25 +0000 |
|---|---|---|
| committer | Bob Wilson <bob.wilson@apple.com> | 2011-12-14 06:08:25 +0000 |
| commit | 721d4b858d8b2f9363adb83adbdbf254757c5dbb (patch) | |
| tree | ae51d47e00574aa619d8a610f132e76dc7cea664 | |
| parent | 4f6f5f9cd21ef3dc4cb0d958f4b73ab6a3a0bbe4 (diff) | |
| download | bcm5719-llvm-721d4b858d8b2f9363adb83adbdbf254757c5dbb.tar.gz bcm5719-llvm-721d4b858d8b2f9363adb83adbdbf254757c5dbb.zip | |
Enable stack protectors by default for iOS. <rdar://problem/8836680>
llvm-svn: 146552
| -rw-r--r-- | clang/lib/Driver/ToolChains.h | 2 | ||||
| -rw-r--r-- | clang/test/Driver/darwin-iphone-defaults.m | 4 |
2 files changed, 2 insertions, 4 deletions
diff --git a/clang/lib/Driver/ToolChains.h b/clang/lib/Driver/ToolChains.h index 45bf0d88c21..c93418cbd1d 100644 --- a/clang/lib/Driver/ToolChains.h +++ b/clang/lib/Driver/ToolChains.h @@ -359,7 +359,7 @@ public: 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)); } diff --git a/clang/test/Driver/darwin-iphone-defaults.m b/clang/test/Driver/darwin-iphone-defaults.m index 62a94039001..e58d88b7c5d 100644 --- a/clang/test/Driver/darwin-iphone-defaults.m +++ b/clang/test/Driver/darwin-iphone-defaults.m @@ -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 |

