diff options
author | Fariborz Jahanian <fjahanian@apple.com> | 2012-01-25 00:20:29 +0000 |
---|---|---|
committer | Fariborz Jahanian <fjahanian@apple.com> | 2012-01-25 00:20:29 +0000 |
commit | aa7b9aa10dd90f79c37e0af7f4c6a0f9efeb288c (patch) | |
tree | e14b7c78706eeb22d22287ee913952085a911a53 /clang/lib/Frontend/CompilerInvocation.cpp | |
parent | c454afedff4c709449d76b5700cc33b503f1d5b7 (diff) | |
download | bcm5719-llvm-aa7b9aa10dd90f79c37e0af7f4c6a0f9efeb288c.tar.gz bcm5719-llvm-aa7b9aa10dd90f79c37e0af7f4c6a0f9efeb288c.zip |
arc migrator: Provide infrastructure to add options
specific to migrator. Use its first option to
warn migrating from GC to arc when
NSAllocateCollectable/NSReallocateCollectable is used.
// rdar://10532541
llvm-svn: 148887
Diffstat (limited to 'clang/lib/Frontend/CompilerInvocation.cpp')
-rw-r--r-- | clang/lib/Frontend/CompilerInvocation.cpp | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/clang/lib/Frontend/CompilerInvocation.cpp b/clang/lib/Frontend/CompilerInvocation.cpp index f4576093d8c..aa367b0a74a 100644 --- a/clang/lib/Frontend/CompilerInvocation.cpp +++ b/clang/lib/Frontend/CompilerInvocation.cpp @@ -1053,6 +1053,11 @@ static bool ParseAnalyzerArgs(AnalyzerOptions &Opts, ArgList &Args, return Success; } +static bool ParseMigratorArgs(MigratorOptions &Opts, ArgList &Args) { + Opts.NoNSAllocReallocError = Args.hasArg(OPT_migrator_no_nsalloc_error); + return true; +} + static bool ParseCodeGenArgs(CodeGenOptions &Opts, ArgList &Args, InputKind IK, DiagnosticsEngine &Diags) { using namespace cc1options; @@ -2051,6 +2056,7 @@ bool CompilerInvocation::CreateFromArgs(CompilerInvocation &Res, } Success = ParseAnalyzerArgs(Res.getAnalyzerOpts(), *Args, Diags) && Success; + Success = ParseMigratorArgs(Res.getMigratorOpts(), *Args) && Success; ParseDependencyOutputArgs(Res.getDependencyOutputOpts(), *Args); Success = ParseDiagnosticArgs(Res.getDiagnosticOpts(), *Args, Diags) && Success; |