@@ -3714,9 +3714,9 @@ class TypePrinter : public TypeVisitor<TypePrinter> {
3714
3714
llvm::DenseMap<const clang::Module *, ModuleDecl *> Result;
3715
3715
3716
3716
// For the current module, consider both private and public imports.
3717
- ModuleDecl::ImportFilter Filter = ModuleDecl::ImportFilterKind::Public ;
3718
- Filter |= ModuleDecl::ImportFilterKind::Private ;
3719
- SmallVector<ModuleDecl:: ImportedModule, 4 > Imports;
3717
+ ModuleDecl::ImportFilter Filter = ModuleDecl::ImportFilterKind::Exported ;
3718
+ Filter |= ModuleDecl::ImportFilterKind::Default ;
3719
+ SmallVector<ImportedModule, 4 > Imports;
3720
3720
Options.CurrentModule ->getImportedModules (Imports, Filter);
3721
3721
3722
3722
SmallVector<ModuleDecl *, 4 > ModulesToProcess;
@@ -3737,7 +3737,7 @@ class TypePrinter : public TypeVisitor<TypePrinter> {
3737
3737
3738
3738
// For transitive imports, consider only public imports.
3739
3739
Imports.clear ();
3740
- Mod->getImportedModules (Imports, ModuleDecl::ImportFilterKind::Public );
3740
+ Mod->getImportedModules (Imports, ModuleDecl::ImportFilterKind::Exported );
3741
3741
for (const auto &Import : Imports) {
3742
3742
ModulesToProcess.push_back (Import.importedModule );
3743
3743
}
@@ -3764,7 +3764,7 @@ class TypePrinter : public TypeVisitor<TypePrinter> {
3764
3764
void printModuleContext (T *Ty) {
3765
3765
FileUnit *File = cast<FileUnit>(Ty->getDecl ()->getModuleScopeContext ());
3766
3766
ModuleDecl *Mod = File->getParentModule ();
3767
- std::string ExportedModuleName = File->getExportedModuleName ();
3767
+ StringRef ExportedModuleName = File->getExportedModuleName ();
3768
3768
3769
3769
// Clang declarations need special treatment: Multiple Clang modules can
3770
3770
// contain the same declarations from a textually included header, but not
0 commit comments