Merge pull request #64367 from bnbarham/system-to-sdk

[SourceKit] Stop using `isSystemModule` to represent "non-user" modules
This commit is contained in:
Ben Barham
2023-03-17 10:15:04 -07:00
committed by GitHub
20 changed files with 255 additions and 208 deletions

View File

@@ -252,10 +252,10 @@ static void reportSemanticAnnotations(const SourceTextInfo &IFaceInfo,
bool IsSystem;
if (Ref.Mod) {
Kind = SwiftLangSupport::getUIDForModuleRef();
IsSystem = Ref.Mod.isSystemModule();
IsSystem = Ref.Mod.isNonUserModule();
} else if (Ref.Dcl) {
Kind = SwiftLangSupport::getUIDForDecl(Ref.Dcl, /*IsRef=*/true);
IsSystem = Ref.Dcl->getModuleContext()->isSystemModule();
IsSystem = Ref.Dcl->getModuleContext()->isNonUserModule();
}
if (Kind.isInvalid())
continue;
@@ -510,7 +510,7 @@ bool SwiftInterfaceGenContext::matches(StringRef ModuleName,
if (Invok.getSDKPath() != Impl.Invocation.getSDKPath())
return false;
if (Impl.Mod->isSystemModule())
if (Impl.Mod->isNonUserModule())
return true;
const SearchPathOptions &SPOpts = Invok.getSearchPathOptions();