diff options
author | Argyrios Kyrtzidis <akyrtzi@gmail.com> | 2011-07-09 20:00:58 +0000 |
---|---|---|
committer | Argyrios Kyrtzidis <akyrtzi@gmail.com> | 2011-07-09 20:00:58 +0000 |
commit | 7fbd97f641aac5aa047b16fb075e30826023ca09 (patch) | |
tree | 65b1cd86783449c9f4a54182688b1b2209342e51 /clang/lib/Driver/Tools.cpp | |
parent | 25659e93c755bdb6832ca58e7d4b698df9f2e10f (diff) | |
download | bcm5719-llvm-7fbd97f641aac5aa047b16fb075e30826023ca09.tar.gz bcm5719-llvm-7fbd97f641aac5aa047b16fb075e30826023ca09.zip |
[arcmt] Introduce new '-ccc-arcmt-migrate <path>' ARC migration driver option.
This is a new mode of migration, where we avoid modifying the original files but
we emit temporary files instead.
<path> will be used to keep migration process metadata. Currently the temporary files
that are produced are put in the system's temp directory but we can put them
in the <path> if is necessary.
Also introduce new ARC migration functions in libclang whose only purpose,
currently, is to accept <path> and provide pairs of original file/transformed file
to map from the originals to the files after transformations are applied.
Finally introduce the c-arcmt-test utility that exercises the new libclang functions,
update arcmt-test, and add tests for the whole process.
rdar://9735086.
llvm-svn: 134844
Diffstat (limited to 'clang/lib/Driver/Tools.cpp')
-rw-r--r-- | clang/lib/Driver/Tools.cpp | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/clang/lib/Driver/Tools.cpp b/clang/lib/Driver/Tools.cpp index 084a3a06854..9b3e49480ef 100644 --- a/clang/lib/Driver/Tools.cpp +++ b/clang/lib/Driver/Tools.cpp @@ -1423,7 +1423,8 @@ void Clang::ConstructJob(Compilation &C, const JobAction &JA, if (!Args.hasArg(options::OPT_fno_objc_arc)) { if (const Arg *A = Args.getLastArg(options::OPT_ccc_arcmt_check, - options::OPT_ccc_arcmt_modify)) { + options::OPT_ccc_arcmt_modify, + options::OPT_ccc_arcmt_migrate)) { switch (A->getOption().getID()) { default: llvm_unreachable("missed a case"); @@ -1433,6 +1434,11 @@ void Clang::ConstructJob(Compilation &C, const JobAction &JA, case options::OPT_ccc_arcmt_modify: CmdArgs.push_back("-arcmt-modify"); break; + case options::OPT_ccc_arcmt_migrate: + CmdArgs.push_back("-arcmt-migrate"); + CmdArgs.push_back("-arcmt-migrate-directory"); + CmdArgs.push_back(A->getValue(Args)); + break; } } } |