mirror of
https://github.com/apple/swift.git
synced 2025-12-14 20:36:38 +01:00
[ClangImporter] Remove importer-based NS stripping. (#3880)
* [ClangImporter] Remove importer-based NS stripping. As Tony puts it, in the end we wound up with more Foundation declarations imported as members or keeping "NS" than those that dropped it, and any further decisions will be made on a case-by-case basis. Move all of the existing cases of prefix-stripping into Foundation's API notes and drop the logic from the compiler. Tested by dumping the generated interface for Foundation and its submodules for both macOS and the iOS simulator, and comparing the results. A few cases did slip through here because of the interaction between "SwiftName" and "Availability: nonswift". The next commit will re-add "NS" to some stragglers that we missed. rdar://problem/26880017 * APINotes: Add "NS" back to a few types. NSKeyedUnarchiverDelegate NSKeyedArchiverDelegate NSTextCheckingTypes NSBinarySearchingOptions NSEnumerationOptions NSSortOptions More rdar://problem/26880017 * Remove now-redundant SwiftNames from API notes. No change observed in the generated interface of Foundation and its submodules. Finishes rdar://problem/26880017.
This commit is contained in:
committed by
Ted Kremenek
parent
654c5235fe
commit
b5aca663bc
@@ -771,7 +771,6 @@ static bool ParseLangArgs(LangOptions &Opts, ArgList &Args,
|
||||
Opts.Playground |= Args.hasArg(OPT_playground);
|
||||
Opts.Swift3Migration |= Args.hasArg(OPT_swift3_migration);
|
||||
Opts.WarnOmitNeedlessWords = Args.hasArg(OPT_warn_omit_needless_words);
|
||||
Opts.StripNSPrefix |= Args.hasArg(OPT_enable_strip_ns_prefix);
|
||||
Opts.InferImportAsMember |= Args.hasArg(OPT_enable_infer_import_as_member);
|
||||
|
||||
Opts.EnableThrowWithoutTry |= Args.hasArg(OPT_enable_throw_without_try);
|
||||
|
||||
Reference in New Issue
Block a user