[Explicit Module Builds] Propagate the C++ Interop mode to interface sub-invocations and dependency scanner

This commit is contained in:
Artem Chikin
2023-11-07 17:00:36 -05:00
committed by artemcm
parent 1bee91bb18
commit bc17581ae6
4 changed files with 37 additions and 2 deletions

View File

@@ -422,6 +422,13 @@ SerializedModuleLoaderBase::getImportsOfModule(
if (dotPos != std::string::npos)
moduleName = moduleName.slice(0, dotPos);
// Reverse rewrite of user-specified C++ standard
// library module name to one used in the modulemap.
// TODO: If we are going to do this for more than this module,
// we will need a centralized system for doing module import name remap.
if (moduleName == Ctx.Id_CxxStdlib.str())
moduleName = "std";
importedModuleNames.insert(moduleName);
}