[interop][sourcekit] print submodules of CxxStdlib when printing out IDE interface of it

This commit is contained in:
Alex Lorenz
2023-03-21 17:14:12 -07:00
parent eb6dc2279a
commit 772909e229
2 changed files with 13 additions and 0 deletions

View File

@@ -287,6 +287,13 @@ static bool getModuleInterfaceInfo(ASTContext &Ctx,
ErrMsg += ModuleName;
return true;
}
if (Mod->failedToLoad() && ModuleName == "CxxStdlib") {
// We might fail to load the underlying Clang module
// for a Swift overlay module like 'CxxStdlib'. Make sure an error is reported in this case, so that we can either retry to load with C++ interoperability enabled, and if that fails, we can report this to the user.
ErrMsg = "Could not load underlying module for: ";
ErrMsg += ModuleName;
return true;
}
PrintOptions Options = PrintOptions::printModuleInterface(
Ctx.TypeCheckerOpts.PrintFullConvention);