Commit Graph

5 Commits

Author SHA1 Message Date
Allan Shortlidge
3c68c20ef5 AST: Handle TopLevelCodeDecl in DeclExportabilityVisitor. 2023-12-10 09:10:06 -08:00
Allan Shortlidge
a038f7d8c6 AST: Handle PoundDiagnosticDecl in DeclExportabilityVisitor. 2023-12-10 09:10:05 -08:00
Allan Shortlidge
9444534658 AST: Handle MacroExpansionDecl in DeclExportabilityVisitor.
Instances of `MacroExpansionDecl` may be found in the AST when declarations are
expanded from freestanding declaration macros and therefore exportability
computations must be prepared to handle them.

Resolves rdar://119449439
2023-12-10 09:10:05 -08:00
Allan Shortlidge
2d8b4d1b18 AST: Support ImportDecls in DeclExportabilityVisitor.
Resolves rdar://117438934
2023-10-24 22:58:51 -07:00
Allan Shortlidge
82923d580d AST: Expose DeclExportabilityVisitor.
Extract `ExternallyAccessibleDeclVisitor` from `Serialization.cpp` into its own
header and rename it to `DeclExportabilityVisitor` to better align with
terminology in other parts of the compiler. Ideally, `DeclExportabilityVisitor`
should become the canoncial implementation of for exportability checks,
consolidating logic that is currently spread between serialization, module
interface printing, TBDGen, and type checking. For now, it is only used in
serialization to implement serialization safety checks.
2023-09-15 17:15:48 -07:00