aboutsummaryrefslogtreecommitdiff
path: root/lib/Driver/Tools.cpp
diff options
context:
space:
mode:
authorJohn McCall <rjmccall@apple.com>2011-06-15 23:25:17 +0000
committerJohn McCall <rjmccall@apple.com>2011-06-15 23:25:17 +0000
commit8f0e8d22960d56f8390f4971e2c0f2f0a0884602 (patch)
tree288fc5496bfa36bab70b98f3be6bb5cd13645214 /lib/Driver/Tools.cpp
parentf85e193739c953358c865005855253af4f68a497 (diff)
The ARC Migration Tool. All the credit goes to Argyrios and Fariborz
for this. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@133104 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/Driver/Tools.cpp')
-rw-r--r--lib/Driver/Tools.cpp20
1 files changed, 20 insertions, 0 deletions
diff --git a/lib/Driver/Tools.cpp b/lib/Driver/Tools.cpp
index 1947827438..85f4c1fb21 100644
--- a/lib/Driver/Tools.cpp
+++ b/lib/Driver/Tools.cpp
@@ -1389,6 +1389,26 @@ void Clang::ConstructJob(Compilation &C, const JobAction &JA,
Args.AddLastArg(CmdArgs, options::OPT_working_directory);
+ if (!Args.hasArg(options::OPT_fno_objc_arc)) {
+ if (const Arg *A = Args.getLastArg(options::OPT_ccc_arrmt_check,
+ options::OPT_ccc_arrmt_modify,
+ options::OPT_ccc_arrmt_modify_in_memory)) {
+ switch (A->getOption().getID()) {
+ default:
+ llvm_unreachable("missed a case");
+ case options::OPT_ccc_arrmt_check:
+ CmdArgs.push_back("-arcmt-check");
+ break;
+ case options::OPT_ccc_arrmt_modify:
+ CmdArgs.push_back("-arcmt-modify");
+ break;
+ case options::OPT_ccc_arrmt_modify_in_memory:
+ CmdArgs.push_back("-arcmt-modify-in-memory");
+ break;
+ }
+ }
+ }
+
// Add preprocessing options like -I, -D, etc. if we are using the
// preprocessor.
//