mirror of
https://github.com/apple/swift.git
synced 2025-12-14 20:36:38 +01:00
Add -strip-field-names and -strip-field-metadata IRGen options
This controls emission of field metadata for reflection, providing
the default decision. We might want to explore finer-grained
control per type, likely as a source code annotation.
-strip-field-names
Strip field names from nominal type metadata.
-strip-field-metadata
Strip all field metadata for nominal types. This also implies
-strip-field-names.
NFC yet.
This commit is contained in:
@@ -1204,6 +1204,15 @@ static bool ParseIRGenArgs(IRGenOptions &Opts, ArgList &Args,
|
||||
}
|
||||
}
|
||||
|
||||
if (Args.hasArg(OPT_strip_field_names)) {
|
||||
Opts.StripFieldNames = true;
|
||||
}
|
||||
|
||||
if (Args.hasArg(OPT_strip_field_metadata)) {
|
||||
Opts.StripFieldMetadata = true;
|
||||
Opts.StripFieldNames = true;
|
||||
}
|
||||
|
||||
return false;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user