[objcmt] Transfer the objcmt flags from the driver to cc1 invocation and

instantiate ObjCMigrateASTConsumer with the specific options that were enabled.

llvm-svn: 194628
This commit is contained in:
Argyrios Kyrtzidis 2013-11-13 23:38:20 +00:00
parent 7a2645f91f
commit 55ecf99285
2 changed files with 15 additions and 1 deletions

View File

@ -1711,7 +1711,7 @@ ASTConsumer *MigrateSourceAction::CreateASTConsumer(CompilerInstance &CI,
PPRec = new PPConditionalDirectiveRecord(CI.getSourceManager());
CI.getPreprocessor().addPPCallbacks(PPRec);
return new ObjCMigrateASTConsumer(CI.getFrontendOpts().OutputFile,
FrontendOptions::ObjCMT_MigrateAll,
CI.getFrontendOpts().ObjCMTAction,
Remapper,
CI.getFileManager(),
PPRec,

View File

@ -2712,6 +2712,20 @@ void Clang::ConstructJob(Compilation &C, const JobAction &JA,
Args.AddLastArg(CmdArgs, options::OPT_objcmt_migrate_subscripting);
Args.AddLastArg(CmdArgs, options::OPT_objcmt_migrate_property);
}
} else {
Args.AddLastArg(CmdArgs, options::OPT_objcmt_migrate_literals);
Args.AddLastArg(CmdArgs, options::OPT_objcmt_migrate_subscripting);
Args.AddLastArg(CmdArgs, options::OPT_objcmt_migrate_property);
Args.AddLastArg(CmdArgs, options::OPT_objcmt_migrate_all);
Args.AddLastArg(CmdArgs, options::OPT_objcmt_migrate_readonly_property);
Args.AddLastArg(CmdArgs, options::OPT_objcmt_migrate_readwrite_property);
Args.AddLastArg(CmdArgs, options::OPT_objcmt_migrate_annotation);
Args.AddLastArg(CmdArgs, options::OPT_objcmt_migrate_instancetype);
Args.AddLastArg(CmdArgs, options::OPT_objcmt_migrate_nsmacros);
Args.AddLastArg(CmdArgs, options::OPT_objcmt_migrate_protocol_conformance);
Args.AddLastArg(CmdArgs, options::OPT_objcmt_atomic_property);
Args.AddLastArg(CmdArgs, options::OPT_objcmt_returns_innerpointer_property);
Args.AddLastArg(CmdArgs, options::OPT_objcmt_ns_nonatomic_iosonly);
}
// Add preprocessing options like -I, -D, etc. if we are using the