Allow loading package interface if in same package.

Add a new flag to enable package interface loading.
Use the last value of package-name in case of dupes.
Rename PrintInterfaceContentMode as InterfaceMode.
Update diagnostics.
Test package interface loading with various scenarios.
Test duplicate package-name.
This commit is contained in:
Ellie Shin
2023-11-08 17:40:40 -08:00
parent aba3b6c24e
commit e5ca8e5c0b
18 changed files with 316 additions and 140 deletions

View File

@@ -56,7 +56,7 @@ struct ModuleInterfaceOptions {
std::string IgnorablePrivateFlags;
/// Prints package, SPIs, or public/inlinable decls depending on the mode.
PrintInterfaceContentMode InterfaceContentMode = PrintInterfaceContentMode::Public;
InterfaceMode InterfaceContentMode = InterfaceMode::Public;
/// Print imports with both @_implementationOnly and @_spi, only applies
/// when PrintSPIs is true.