[Sema] Intro @_spiOnly attribute and import filter

Introduce the attribute and basic import filter logic.
This commit is contained in:
Alexis Laferrière
2022-08-25 09:40:58 -07:00
parent cf8f61d76b
commit aaaef3411e
8 changed files with 29 additions and 3 deletions

View File

@@ -696,11 +696,13 @@ public:
Default = 1 << 1,
/// Include imports declared with `@_implementationOnly`.
ImplementationOnly = 1 << 2,
/// Include imports of SPIs declared with `@_spi`
/// Include imports of SPIs declared with `@_spi`.
SPIAccessControl = 1 << 3,
/// Include imports declared with `@_spiOnly`.
SPIOnly = 1 << 4,
/// Include imports shadowed by a cross-import overlay. Unshadowed imports
/// are included whether or not this flag is specified.
ShadowedByCrossImportOverlay = 1 << 4
ShadowedByCrossImportOverlay = 1 << 5
};
/// \sa getImportedModules
using ImportFilter = OptionSet<ImportFilterKind>;