Skip to content

Commit 7e024ab

Browse files
authored
Merge pull request #9391 from eeckstein/plist-mangling
2 parents 994dcd9 + 07cc283 commit 7e024ab

File tree

2 files changed

+10
-2
lines changed

2 files changed

+10
-2
lines changed

lib/Demangling/OldRemangler.cpp

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1668,11 +1668,14 @@ void Remangler::mangleKeyPathSetterThunkHelper(Node *node) {
16681668
}
16691669

16701670
void Remangler::mangleProtocolListWithClass(Node *node) {
1671-
Out << "<procotol-list-with-class>";
1671+
Out << "Xc";
1672+
mangleChildNode(node, 1);
1673+
mangleProtocolListWithoutPrefix(node->getChild(0));
16721674
}
16731675

16741676
void Remangler::mangleProtocolListWithAnyObject(Node *node) {
1675-
Out << "<procotol-list-with-any-object>";
1677+
Out << "Xl";
1678+
mangleProtocolListWithoutPrefix(node->getChild(0));
16761679
}
16771680

16781681
void Remangler::mangleVTableThunk(Node *node) {

test/stdlib/RuntimeObjC.swift

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -374,6 +374,11 @@ Runtime.test("Generic class ObjC runtime names") {
374374
expectEqual("_TtGC1a12GenericClassPSo9NSCopyingS_9ProtocolAS_9ProtocolB__",
375375
NSStringFromClass(GenericClass<ProtocolB & NSCopying & ProtocolA>.self))
376376

377+
expectEqual("_TtGC1a12GenericClassXcCS_9SomeClassS_9ProtocolA__",
378+
NSStringFromClass(GenericClass<ProtocolA & SomeClass>.self))
379+
expectEqual("_TtGC1a12GenericClassXlS_9ProtocolA__",
380+
NSStringFromClass(GenericClass<ProtocolA & AnyObject>.self))
381+
377382
expectEqual("_TtGC1a17MultiGenericClassGVS_13GenericStructSi_GOS_11GenericEnumGS2_Si___",
378383
NSStringFromClass(MultiGenericClass<GenericStruct<Int>,
379384
GenericEnum<GenericEnum<Int>>>.self))

0 commit comments

Comments
 (0)