Skip to content

Commit 839f99e

Browse files
committed
Sema: Register clang's export_as in ModuleDecl::getExportAsModule
This service on ModuleDecl wasn't actually used before this PR. The main client in ASTPrinter calls direclty the underlying logic in FileUnit. Let's update it for our needs.
1 parent 9eaa0e5 commit 839f99e

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

lib/ClangImporter/ClangImporter.cpp

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2781,6 +2781,9 @@ ClangModuleUnit *ClangImporter::Implementation::getWrapperForModule(
27812781
wrapper->setIsSystemModule(underlying->IsSystem);
27822782
wrapper->setIsNonSwiftModule();
27832783
wrapper->setHasResolvedImports();
2784+
if (!underlying->ExportAsModule.empty())
2785+
wrapper->setExportAsName(
2786+
SwiftContext.getIdentifier(underlying->ExportAsModule));
27842787

27852788
auto file = new (SwiftContext) ClangModuleUnit(*wrapper, *this,
27862789
underlying);

0 commit comments

Comments
 (0)