Skip to content

Commit 7bf335a

Browse files
committed
fix implicit import of CxxStd module
1 parent a5ee11a commit 7bf335a

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
@@ -2802,7 +2802,9 @@ ClangModuleUnit *ClangImporter::Implementation::getWrapperForModule(
28022802
// Make sure that synthesized Swift code in the clang module wrapper
28032803
// (e.g. _SwiftifyImport macro expansions) can access the same symbols as
28042804
// if it were actually in the clang module
2805-
ImportPath::Builder importPath(SwiftContext, I->getFullModuleName(), '.');
2805+
StringRef moduleName = isCxxStdModule(I) ? SwiftContext.Id_CxxStdlib.str() :
2806+
I->getFullModuleName();
2807+
ImportPath::Builder importPath(SwiftContext, moduleName, '.');
28062808
UnloadedImportedModule importedModule(importPath.copyTo(SwiftContext), ImportKind::Module);
28072809
implicitImportInfo.AdditionalUnloadedImports.push_back(importedModule);
28082810
}

0 commit comments

Comments
 (0)