forked from OSchip/llvm-project
Don't complain about -fobjc-link-runtime being unused with -fobjc-arc.
If you build with -fobjc-arc, then -fobjc-link-runtime is implied but we don't need to warn about it being unused in that case. rdar://12039965 llvm-svn: 161444
This commit is contained in:
parent
7c88d2ae0f
commit
29536fcbd5
|
@ -174,8 +174,10 @@ static bool isObjCAutoRefCount(const ArgList &Args) {
|
|||
|
||||
/// \brief Determine whether we are linking the ObjC runtime.
|
||||
static bool isObjCRuntimeLinked(const ArgList &Args) {
|
||||
if (isObjCAutoRefCount(Args))
|
||||
if (isObjCAutoRefCount(Args)) {
|
||||
Args.ClaimAllArgs(options::OPT_fobjc_link_runtime);
|
||||
return true;
|
||||
}
|
||||
return Args.hasArg(options::OPT_fobjc_link_runtime);
|
||||
}
|
||||
|
||||
|
|
|
@ -11,3 +11,7 @@
|
|||
// CHECK-ARCLITE-OSX: -lobjc
|
||||
// CHECK-NOARCLITE-NOT: libarclite
|
||||
// CHECK-NOSTDLIB-NOT: -lobjc
|
||||
|
||||
// RUN: %clang -### -target x86_64-apple-darwin10 -fobjc-link-runtime -fobjc-arc -mmacosx-version-min=10.7 %s 2>&1 | FileCheck -check-prefix=CHECK-UNUSED %s
|
||||
|
||||
// CHECK-UNUSED-NOT: warning: argument unused during compilation: '-fobjc-link-runtime'
|
||||
|
|
Loading…
Reference in New Issue