[SourceKit] Stop using isSystemModule to represent "non-user" modules

Rather than using `ModuleDecl::isSystemModule()` to determine whether a
module is not a user module, instead check whether the module was
defined adjacent to the compiler or if it's part of the SDK.

If no SDK path was given, then `isSystemModule` is still used as a
fallback.

Resolves rdar://89253201.
This commit is contained in:
Ben Barham
2023-03-13 12:41:59 -07:00
parent b7a2fa28bf
commit eec2848508
20 changed files with 255 additions and 208 deletions

View File

@@ -131,7 +131,7 @@ void CodeCompletionStringPrinter::printTypeRef(Type T, const TypeDecl *TD,
Identifier Name,
PrintNameContext NameContext) {
NextChunkKind = TD->getModuleContext()->isSystemModule()
NextChunkKind = TD->getModuleContext()->isNonUserModule()
? ChunkKind::TypeIdSystem
: ChunkKind::TypeIdUser;