Skip to content

Commit 229280f

Browse files
committed
fix implicit import of CxxStd module
1 parent 0770e78 commit 229280f

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

lib/ClangImporter/ClangImporter.cpp

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2799,7 +2799,9 @@ ClangModuleUnit *ClangImporter::Implementation::getWrapperForModule(
27992799
// Make sure that synthesized Swift code in the clang module wrapper
28002800
// (e.g. _SwiftifyImport macro expansions) can access the same symbols as
28012801
// if it were actually in the clang module
2802-
ImportPath::Builder importPath(SwiftContext, I->getFullModuleName(), '.');
2802+
StringRef moduleName = isCxxStdModule(I) ? SwiftContext.Id_CxxStdlib.str() :
2803+
I->getFullModuleName();
2804+
ImportPath::Builder importPath(SwiftContext, moduleName, '.');
28032805
UnloadedImportedModule importedModule(importPath.copyTo(SwiftContext), ImportKind::Module);
28042806
implicitImportInfo.AdditionalUnloadedImports.push_back(importedModule);
28052807
}

0 commit comments

Comments
 (0)