r184776 - [arcmt/driver] For the -ccc-arcmt-* flags, claim them when -fno-objc-arc is passed to avoid the
Argyrios Kyrtzidis
akyrtzi at gmail.com
Mon Jun 24 12:01:19 PDT 2013
Author: akirtzidis
Date: Mon Jun 24 14:01:18 2013
New Revision: 184776
URL: http://llvm.org/viewvc/llvm-project?rev=184776&view=rev
Log:
[arcmt/driver] For the -ccc-arcmt-* flags, claim them when -fno-objc-arc is passed to avoid the
"argument unused during compilation" warning.
rdar://14240566
Modified:
cfe/trunk/lib/Driver/Tools.cpp
cfe/trunk/test/ARCMT/driver-migrate.m
Modified: cfe/trunk/lib/Driver/Tools.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/Driver/Tools.cpp?rev=184776&r1=184775&r2=184776&view=diff
==============================================================================
--- cfe/trunk/lib/Driver/Tools.cpp (original)
+++ cfe/trunk/lib/Driver/Tools.cpp Mon Jun 24 14:01:18 2013
@@ -2611,6 +2611,10 @@ void Clang::ConstructJob(Compilation &C,
break;
}
}
+ } else {
+ Args.ClaimAllArgs(options::OPT_ccc_arcmt_check);
+ Args.ClaimAllArgs(options::OPT_ccc_arcmt_modify);
+ Args.ClaimAllArgs(options::OPT_ccc_arcmt_migrate);
}
if (const Arg *A = Args.getLastArg(options::OPT_ccc_objcmt_migrate)) {
Modified: cfe/trunk/test/ARCMT/driver-migrate.m
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/test/ARCMT/driver-migrate.m?rev=184776&r1=184775&r2=184776&view=diff
==============================================================================
--- cfe/trunk/test/ARCMT/driver-migrate.m (original)
+++ cfe/trunk/test/ARCMT/driver-migrate.m Mon Jun 24 14:01:18 2013
@@ -10,3 +10,6 @@
// LINK-NOT: {{ld(.exe)?"}}
// LINK: {{touch(.exe)?"}}
+
+// RUN: %clang -### -ccc-arcmt-migrate /foo/bar -fsyntax-only -fno-objc-arc %s 2>&1 | FileCheck -check-prefix=CHECK-NOARC %s
+// CHECK-NOARC-NOT: argument unused during compilation
More information about the cfe-commits
mailing list