mirror of
https://github.com/apple/swift.git
synced 2025-12-21 12:14:44 +01:00
[Sema] Report public imports of private modules
Intro the concept of library access or distribution level to identify layers of libraries and report public imports of private libraries from public ones. rdar://62934005
This commit is contained in:
@@ -55,6 +55,20 @@ namespace swift {
|
||||
Complete,
|
||||
};
|
||||
|
||||
/// Access or distribution level of a library.
|
||||
enum class LibraryLevel : uint8_t {
|
||||
/// Application Programming Interface that is publicly distributed so
|
||||
/// public decls are really public and only @_spi decls are SPI.
|
||||
API,
|
||||
|
||||
/// System Programming Interface that has restricted distribution
|
||||
/// all decls in the module are considered to be SPI including public ones.
|
||||
SPI,
|
||||
|
||||
/// The library has some other undefined distribution.
|
||||
Other
|
||||
};
|
||||
|
||||
/// A collection of options that affect the language dialect and
|
||||
/// provide compiler debugging facilities.
|
||||
class LangOptions final {
|
||||
@@ -306,6 +320,9 @@ namespace swift {
|
||||
/// Objective-C-derived classes and 'dynamic' members.
|
||||
bool EnableSwift3ObjCInference = false;
|
||||
|
||||
/// Access or distribution level of the whole module being parsed.
|
||||
LibraryLevel LibraryLevel = LibraryLevel::Other;
|
||||
|
||||
/// Warn about cases where Swift 3 would infer @objc but later versions
|
||||
/// of Swift do not.
|
||||
Swift3ObjCInferenceWarnings WarnSwift3ObjCInference =
|
||||
|
||||
Reference in New Issue
Block a user