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).
llvm-svn: 109072
diff --git a/clang/lib/Driver/ToolChains.h b/clang/lib/Driver/ToolChains.h
index 2be88f10..b6c7bad 100644
--- a/clang/lib/Driver/ToolChains.h
+++ b/clang/lib/Driver/ToolChains.h
@@ -153,11 +153,9 @@
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