[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

@@ -536,6 +536,9 @@ UnboundImport::UnboundImport(ImportDecl *ID)
if (ID->getAttrs().hasAttribute<ImplementationOnlyAttr>())
import.options |= ImportFlags::ImplementationOnly;
if (ID->getAttrs().hasAttribute<SPIOnlyAttr>())
import.options |= ImportFlags::SPIOnly;
if (auto *privateImportAttr =
ID->getAttrs().getAttribute<PrivateImportAttr>()) {
import.options |= ImportFlags::PrivateImport;