Skip to content

Commit 9973f62

Browse files
committed
Sync main
1 parent 30ad2ef commit 9973f62

File tree

1 file changed

+5
-5
lines changed

1 file changed

+5
-5
lines changed

lib/AST/ASTPrinter.cpp

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -3714,9 +3714,9 @@ class TypePrinter : public TypeVisitor<TypePrinter> {
37143714
llvm::DenseMap<const clang::Module *, ModuleDecl *> Result;
37153715

37163716
// 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;
37203720
Options.CurrentModule->getImportedModules(Imports, Filter);
37213721

37223722
SmallVector<ModuleDecl *, 4> ModulesToProcess;
@@ -3737,7 +3737,7 @@ class TypePrinter : public TypeVisitor<TypePrinter> {
37373737

37383738
// For transitive imports, consider only public imports.
37393739
Imports.clear();
3740-
Mod->getImportedModules(Imports, ModuleDecl::ImportFilterKind::Public);
3740+
Mod->getImportedModules(Imports, ModuleDecl::ImportFilterKind::Exported);
37413741
for (const auto &Import : Imports) {
37423742
ModulesToProcess.push_back(Import.importedModule);
37433743
}
@@ -3764,7 +3764,7 @@ class TypePrinter : public TypeVisitor<TypePrinter> {
37643764
void printModuleContext(T *Ty) {
37653765
FileUnit *File = cast<FileUnit>(Ty->getDecl()->getModuleScopeContext());
37663766
ModuleDecl *Mod = File->getParentModule();
3767-
std::string ExportedModuleName = File->getExportedModuleName();
3767+
StringRef ExportedModuleName = File->getExportedModuleName();
37683768

37693769
// Clang declarations need special treatment: Multiple Clang modules can
37703770
// contain the same declarations from a textually included header, but not

0 commit comments

Comments
 (0)