Skip to content

Commit 3f6e367

Browse files
authored
Merge pull request #26349 from eeckstein/fix-astmangler
ASTMangler: fix mangling of generic ObjC types
2 parents 11beeb7 + 6c88ca7 commit 3f6e367

File tree

1 file changed

+5
-2
lines changed

1 file changed

+5
-2
lines changed

lib/AST/ASTMangler.cpp

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1231,8 +1231,11 @@ void ASTMangler::appendBoundGenericArgs(Type type, bool &isFirstArgList) {
12311231
} else {
12321232
auto boundType = cast<BoundGenericType>(typePtr);
12331233
genericArgs = boundType->getGenericArgs();
1234-
if (Type parent = boundType->getParent())
1235-
appendBoundGenericArgs(parent->getDesugaredType(), isFirstArgList);
1234+
if (Type parent = boundType->getParent()) {
1235+
GenericTypeDecl *decl = boundType->getAnyGeneric();
1236+
if (!getSpecialManglingContext(decl, UseObjCProtocolNames))
1237+
appendBoundGenericArgs(parent->getDesugaredType(), isFirstArgList);
1238+
}
12361239
}
12371240
if (isFirstArgList) {
12381241
appendOperator("y");

0 commit comments

Comments
 (0)