diff options
author | John McCall <rjmccall@apple.com> | 2012-08-21 02:47:43 +0000 |
---|---|---|
committer | John McCall <rjmccall@apple.com> | 2012-08-21 02:47:43 +0000 |
commit | 0a7dd788dbef975f35f273c7ab913f480f7edd60 (patch) | |
tree | 4ff726c6ed21d7c822a307b124bf4fec48ffc89a /lib/Driver/Tools.cpp | |
parent | eb8f2efb17c74620510a38cb437e792ea9c76021 (diff) |
Screw around with ObjCRuntime some more, changing the
diagnostics for bad deployment targets and adding a few
more predicates. Includes a patch by Jonathan Schleifer
to enable ARC for ObjFW.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@162252 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/Driver/Tools.cpp')
-rw-r--r-- | lib/Driver/Tools.cpp | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/lib/Driver/Tools.cpp b/lib/Driver/Tools.cpp index ed67f7b9a1..e9f1aab90b 100644 --- a/lib/Driver/Tools.cpp +++ b/lib/Driver/Tools.cpp @@ -2541,8 +2541,7 @@ void Clang::ConstructJob(Compilation &C, const JobAction &JA, // NOTE: This logic is duplicated in ToolChains.cpp. bool ARC = isObjCAutoRefCount(Args); if (ARC) { - if (!getToolChain().SupportsObjCARC()) - D.Diag(diag::err_arc_unsupported); + getToolChain().CheckObjCARC(); CmdArgs.push_back("-fobjc-arc"); @@ -4481,7 +4480,7 @@ void darwin::Link::ConstructJob(Compilation &C, const JobAction &JA, ObjCRuntime runtime = getDarwinToolChain().getDefaultObjCRuntime(/*nonfragile*/ true); // We use arclite library for both ARC and subscripting support. - if ((!runtime.hasARC() && isObjCAutoRefCount(Args)) || + if ((!runtime.hasNativeARC() && isObjCAutoRefCount(Args)) || !runtime.hasSubscripting()) getDarwinToolChain().AddLinkARCArgs(Args, CmdArgs); } |