aboutsummaryrefslogtreecommitdiff
path: root/lib/Driver/ToolChains.cpp
diff options
context:
space:
mode:
authorJohn McCall <rjmccall@apple.com>2011-09-09 20:41:01 +0000
committerJohn McCall <rjmccall@apple.com>2011-09-09 20:41:01 +0000
commit13db5cfc4e5f03eb70efe0d227b53b8280f16161 (patch)
tree94795d436a9e5021d700babc08f1fcb34e0465bf /lib/Driver/ToolChains.cpp
parent88914801a4d73e321c6f74f97df7d7b11c298bc6 (diff)
Treat the weak export of block runtime symbols as a deployment-target
feature akin to the ARC runtime checks. Removes a terrible hack where IR gen needed to find the declarations of those symbols in the translation unit. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@139404 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/Driver/ToolChains.cpp')
-rw-r--r--lib/Driver/ToolChains.cpp8
1 files changed, 8 insertions, 0 deletions
diff --git a/lib/Driver/ToolChains.cpp b/lib/Driver/ToolChains.cpp
index 7b5183c106..bcd540084d 100644
--- a/lib/Driver/ToolChains.cpp
+++ b/lib/Driver/ToolChains.cpp
@@ -109,6 +109,14 @@ void Darwin::configureObjCRuntime(ObjCRuntime &runtime) const {
runtime.HasTerminate = false;
}
+/// Darwin provides a blocks runtime starting in MacOS X 10.6 and iOS 3.2.
+bool Darwin::hasBlocksRuntime() const {
+ if (isTargetIPhoneOS())
+ return !isIPhoneOSVersionLT(3, 2);
+ else
+ return !isMacosxVersionLT(10, 6);
+}
+
// FIXME: Can we tablegen this?
static const char *GetArmArchForMArch(StringRef Value) {
if (Value == "armv6k")