Skip to content

Commit 435d4c6

Browse files
committed
fix implicit import of CxxStd module
1 parent f8fbc8a commit 435d4c6

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
@@ -2830,7 +2830,9 @@ ClangModuleUnit *ClangImporter::Implementation::getWrapperForModule(
28302830
// Make sure that synthesized Swift code in the clang module wrapper
28312831
// (e.g. _SwiftifyImport macro expansions) can access the same symbols as
28322832
// if it were actually in the clang module
2833-
ImportPath::Builder importPath(SwiftContext, I->getFullModuleName(), '.');
2833+
StringRef moduleName = isCxxStdModule(I) ? SwiftContext.Id_CxxStdlib.str() :
2834+
I->getFullModuleName();
2835+
ImportPath::Builder importPath(SwiftContext, moduleName, '.');
28342836
UnloadedImportedModule importedModule(importPath.copyTo(SwiftContext), ImportKind::Module);
28352837
implicitImportInfo.AdditionalUnloadedImports.push_back(importedModule);
28362838
}

0 commit comments

Comments
 (0)