Skip to content

Commit 2b2b763

Browse files
authored
Merge pull request #75750 from eeckstein/fix-remangling
mangling: support inverse conformance requirement mangling in the old re-mangler
2 parents 209b20f + 65ad4eb commit 2b2b763

File tree

2 files changed

+14
-1
lines changed

2 files changed

+14
-1
lines changed

lib/Demangling/OldRemangler.cpp

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3051,5 +3051,7 @@ ManglingError Remangler::mangleHasSymbolQuery(Node *node, unsigned depth) {
30513051
ManglingError
30523052
Remangler::mangleDependentGenericInverseConformanceRequirement(Node *node,
30533053
unsigned depth) {
3054-
return MANGLING_ERROR(ManglingError::UnsupportedNodeKind, node);
3054+
DEMANGLER_ASSERT(node->getNumChildren() == 2, node);
3055+
RETURN_IF_ERROR(mangleConstrainedType(node->getChild(0), depth + 1));
3056+
return mangle(node->getChild(1), depth + 1);
30553057
}
Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
// RUN: %target-swift-frontend %s -emit-ir -o /dev/null
2+
3+
// Check that we don't crash on this in the old re-mangler.
4+
// rdar://133333754
5+
6+
struct S<T> where T: ~Copyable {
7+
final class C {
8+
let x = 27
9+
}
10+
}
11+

0 commit comments

Comments
 (0)