]> granicus.if.org Git - clang/commitdiff
Driver/Darwin: Always allow blocks on Darwin, so that users can conditionally
authorDaniel Dunbar <daniel@zuster.org>
Thu, 22 Jul 2010 00:40:31 +0000 (00:40 +0000)
committerDaniel Dunbar <daniel@zuster.org>
Thu, 22 Jul 2010 00:40:31 +0000 (00:40 +0000)
use blocks even when targetting older systems (using runtime checks and weak
linking).

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

lib/Driver/ToolChains.h

index 2be88f10bf019d5d6b37dff07dfe9b7bca067829..b6c7badf3b3fd28edebed1f2ac2e840ab3b256c3 100644 (file)
@@ -153,11 +153,9 @@ public:
   virtual Tool &SelectTool(const Compilation &C, const JobAction &JA) const;
 
   virtual bool IsBlocksDefault() const {
-    // Blocks default to on for OS X 10.6 and iPhoneOS 3.0 and beyond.
-    if (isTargetIPhoneOS())
-      return !isIPhoneOSVersionLT(3);
-    else
-      return !isMacosxVersionLT(10, 6);
+    // Always allow blocks on Darwin; users interested in versioning are
+    // expected to use /usr/include/Blocks.h.
+    return true;
   }
   virtual bool IsIntegratedAssemblerDefault() const {
 #ifdef DISABLE_DEFAULT_INTEGRATED_ASSEMBLER