File tree Expand file tree Collapse file tree 2 files changed +9
-1
lines changed Expand file tree Collapse file tree 2 files changed +9
-1
lines changed Original file line number Diff line number Diff line change @@ -7626,6 +7626,11 @@ bool importer::requiresCPlusPlus(const clang::Module *module) {
7626
7626
// The libc++ modulemap doesn't currently declare the requirement.
7627
7627
if (module ->getTopLevelModuleName () == " std" )
7628
7628
return true ;
7629
+ // In recent libc++ versions the module is split into multiple top-level
7630
+ // modules (std_vector, std_utility, etc).
7631
+ if (module ->getTopLevelModule ()->IsSystem &&
7632
+ module ->getTopLevelModuleName ().starts_with (" std_" ))
7633
+ return true ;
7629
7634
7630
7635
// Modulemaps often declare the requirement for the top-level module only.
7631
7636
if (auto parent = module ->Parent ) {
Original file line number Diff line number Diff line change @@ -3389,7 +3389,10 @@ namespace {
3389
3389
->getTopLevelModule ()
3390
3390
->getFullModuleName () == n;
3391
3391
};
3392
- if (topLevelModuleEq (decl, " std" )) {
3392
+ if (topLevelModuleEq (decl, " std" ) ||
3393
+ (decl->getOwningModule () && decl->getOwningModule ()->IsSystem &&
3394
+ StringRef (decl->getOwningModule ()->getTopLevelModule ()->Name )
3395
+ .starts_with (" std_" ))) {
3393
3396
if (isAlternativeCStdlibFunctionFromTextualHeader (decl)) {
3394
3397
return nullptr ;
3395
3398
}
You can’t perform that action at this time.
0 commit comments