forked from OSchip/llvm-project
ObjectiveC migrator: Add more options one for each
kind of migration. // rdar://15003157 llvm-svn: 191858
This commit is contained in:
parent
c12c7d0c93
commit
2bfa2b9198
|
@ -171,6 +171,14 @@ def objcmt_migrate_readonly_property : Flag<["-"], "objcmt-migrate-readonly-prop
|
|||
HelpText<"Enable migration to modern ObjC readonly property">;
|
||||
def objcmt_migrate_readwrite_property : Flag<["-"], "objcmt-migrate-readwrite-property">, Flags<[CC1Option]>,
|
||||
HelpText<"Enable migration to modern ObjC readwrite property">;
|
||||
def objcmt_migrate_annotation : Flag<["-"], "objcmt-migrate-annotation">, Flags<[CC1Option]>,
|
||||
HelpText<"Enable migration to property and method annotations">;
|
||||
def objcmt_migrate_instancetype : Flag<["-"], "objcmt-migrate-instancetype">, Flags<[CC1Option]>,
|
||||
HelpText<"Enable migration to infer instancetype for method result type">;
|
||||
def objcmt_migrate_nsmacros : Flag<["-"], "objcmt-migrate-ns-macros">, Flags<[CC1Option]>,
|
||||
HelpText<"Enable migration to NS_ENUM/NS_OPTIONS macros">;
|
||||
def objcmt_migrate_protocol_conformance : Flag<["-"], "objcmt-migrate-protocol-conformance">, Flags<[CC1Option]>,
|
||||
HelpText<"Enable migration to add protocol conformance on classes">;
|
||||
// Make sure all other -ccc- options are rejected.
|
||||
def ccc_ : Joined<["-"], "ccc-">, Group<internal_Group>, Flags<[Unsupported]>;
|
||||
|
||||
|
|
|
@ -803,6 +803,14 @@ static InputKind ParseFrontendArgs(FrontendOptions &Opts, ArgList &Args,
|
|||
Opts.ObjCMTAction |= FrontendOptions::ObjCMT_ReadonlyProperty;
|
||||
if (Args.hasArg(OPT_objcmt_migrate_readwrite_property))
|
||||
Opts.ObjCMTAction |= FrontendOptions::ObjCMT_ReadwriteProperty;
|
||||
if (Args.hasArg(OPT_objcmt_migrate_annotation))
|
||||
Opts.ObjCMTAction |= FrontendOptions::ObjCMT_Annotation;
|
||||
if (Args.hasArg(OPT_objcmt_migrate_instancetype))
|
||||
Opts.ObjCMTAction |= FrontendOptions::ObjCMT_Instancetype;
|
||||
if (Args.hasArg(OPT_objcmt_migrate_nsmacros))
|
||||
Opts.ObjCMTAction |= FrontendOptions::ObjCMT_NsMacros;
|
||||
if (Args.hasArg(OPT_objcmt_migrate_protocol_conformance))
|
||||
Opts.ObjCMTAction |= FrontendOptions::ObjCMT_ProtocolConformance;
|
||||
if (Args.hasArg(OPT_objcmt_migrate_all))
|
||||
Opts.ObjCMTAction |= FrontendOptions::ObjCMT_MigrateDecls;
|
||||
|
||||
|
|
Loading…
Reference in New Issue