@@ -1116,7 +1116,9 @@ void ASTMangler::appendType(Type type, const ValueDecl *forDecl) {
1116
1116
if (tryMangleTypeSubstitution (tybase))
1117
1117
return ;
1118
1118
1119
+ auto outerGenericSig = CurGenericSignature;
1119
1120
appendAnyGenericType (decl);
1121
+ CurGenericSignature = outerGenericSig;
1120
1122
bool isFirstArgList = true ;
1121
1123
appendBoundGenericArgs (type, isFirstArgList);
1122
1124
appendRetroactiveConformances (type);
@@ -1249,7 +1251,9 @@ void ASTMangler::appendType(Type type, const ValueDecl *forDecl) {
1249
1251
appendType (GenArgs[0 ], forDecl);
1250
1252
appendOperator (" Sg" );
1251
1253
} else {
1254
+ auto outerGenericSig = CurGenericSignature;
1252
1255
appendAnyGenericType (Decl);
1256
+ CurGenericSignature = outerGenericSig;
1253
1257
bool isFirstArgList = true ;
1254
1258
appendBoundGenericArgs (type, isFirstArgList);
1255
1259
appendRetroactiveConformances (type);
@@ -3224,17 +3228,6 @@ void ASTMangler::appendConcreteProtocolConformance(
3224
3228
const ProtocolConformance *conformance) {
3225
3229
auto module = conformance->getDeclContext ()->getParentModule ();
3226
3230
3227
- // It's possible that we might not have a generic signature here to get
3228
- // the conformance access path (for example, when mangling types for
3229
- // debugger). In that case, we can use the generic signature of the
3230
- // conformance (if it's present).
3231
- auto conformanceSig = conformance->getGenericSignature ();
3232
- auto shouldUseConformanceSig = !CurGenericSignature && conformanceSig;
3233
- llvm::SaveAndRestore<CanGenericSignature> savedSignature (
3234
- CurGenericSignature, shouldUseConformanceSig
3235
- ? conformanceSig.getCanonicalSignature ()
3236
- : CurGenericSignature);
3237
-
3238
3231
// Conforming type.
3239
3232
Type conformingType = conformance->getType ();
3240
3233
if (conformingType->hasArchetype ())
0 commit comments