mirror of
https://github.com/apple/swift.git
synced 2025-12-21 12:14:44 +01:00
AST: Pick off some usages of GenericTypeParamType::getDecl()
This commit is contained in:
committed by
Alejandro Alonso
parent
a434126554
commit
1ff1b9479a
@@ -1657,10 +1657,8 @@ void Serializer::writeASTBlockEntity(GenericSignature sig) {
|
||||
} else {
|
||||
// Record the generic parameters.
|
||||
for (auto *paramTy : sig.getGenericParams()) {
|
||||
auto *decl = paramTy->getDecl();
|
||||
|
||||
// For a full environment, add the name and canonicalize the param type.
|
||||
Identifier paramName = decl ? decl->getName() : Identifier();
|
||||
Identifier paramName = paramTy->isCanonical() ? Identifier() : paramTy->getName();
|
||||
rawParamIDs.push_back(addDeclBaseNameRef(paramName));
|
||||
|
||||
paramTy = paramTy->getCanonicalType()->castTo<GenericTypeParamType>();
|
||||
|
||||
Reference in New Issue
Block a user