From: Daniel Dunbar Date: Thu, 22 Jul 2010 00:40:31 +0000 (+0000) Subject: Driver/Darwin: Always allow blocks on Darwin, so that users can conditionally X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=ef44a5d65c48b92802aac02126d36c03d818e847;p=clang Driver/Darwin: Always allow blocks on Darwin, so that users can conditionally 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 --- diff --git a/lib/Driver/ToolChains.h b/lib/Driver/ToolChains.h index 2be88f10bf..b6c7badf3b 100644 --- a/lib/Driver/ToolChains.h +++ b/lib/Driver/ToolChains.h @@ -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