mirror of
https://github.com/apple/swift.git
synced 2025-12-21 12:14:44 +01:00
Prefer using known-identifiers to using getIdentifier.
I didn't add anything to the table, just made use of what was already there. We have plenty of additional calls to getIdentifier that could probably benefit from this kind of easy access as well. This commit also removes FOUNDATION_MODULE_NAME and OBJC_MODULE_NAME from Strings.h. Neither of these is likely to change in the future, and both already have KnownIdentifiers equivalents in use. No intended functionality change. Swift SVN r29292
This commit is contained in:
@@ -615,7 +615,7 @@ static Expr *createPropertyLoadOrCallSuperclassGetter(FuncDecl *accessor,
|
||||
static ProtocolDecl *getNSCopyingProtocol(TypeChecker &TC,
|
||||
DeclContext *DC) {
|
||||
ASTContext &ctx = TC.Context;
|
||||
auto foundation = ctx.getLoadedModule(ctx.getIdentifier("Foundation"));
|
||||
auto foundation = ctx.getLoadedModule(ctx.Id_Foundation);
|
||||
if (!foundation)
|
||||
return nullptr;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user