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 | 3deb1ad40ca62a6d530650bfe9b00cf78749dae8 (patch) | |
tree | b0a0230e2d1a21831a75111ff1f0c7064c1c5b1f /clang/lib/Driver/Tools.cpp | |
parent | 3e358ccf92934f97ce68af764f60e15e814c71a7 (diff) | |
download | bcm5719-llvm-3deb1ad40ca62a6d530650bfe9b00cf78749dae8.tar.gz bcm5719-llvm-3deb1ad40ca62a6d530650bfe9b00cf78749dae8.zip |
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.
llvm-svn: 162252
Diffstat (limited to 'clang/lib/Driver/Tools.cpp')
-rw-r--r-- | clang/lib/Driver/Tools.cpp | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/clang/lib/Driver/Tools.cpp b/clang/lib/Driver/Tools.cpp index ed67f7b9a1e..e9f1aab90b2 100644 --- a/clang/lib/Driver/Tools.cpp +++ b/clang/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); } |