Remove special case for stdlib in IsNonUserModuleRequest

It's possible this may be the main module, or a
"local" dependency within the same project, and
should be treated as a user module in such cases.
This commit is contained in:
Hamish Knight
2024-02-09 11:30:52 +00:00
parent e380c66238
commit 05612bffe2
3 changed files with 43 additions and 5 deletions

View File

@@ -3906,10 +3906,6 @@ FrontendStatsTracer::getTraceFormatter<const SourceFile *>() {
}
bool IsNonUserModuleRequest::evaluate(Evaluator &evaluator, ModuleDecl *mod) const {
// stdlib is non-user by definition
if (mod->isStdlibModule())
return true;
// If there's no SDK path, fallback to checking whether the module was
// in the system search path or a clang system module
SearchPathOptions &searchPathOpts = mod->getASTContext().SearchPathOpts;