Skip to content

Commit

Permalink
Merge pull request #75750 from eeckstein/fix-remangling
Browse files Browse the repository at this point in the history
mangling: support inverse conformance requirement mangling in the old re-mangler
  • Loading branch information
eeckstein authored Aug 7, 2024
2 parents 209b20f + 65ad4eb commit 2b2b763
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 1 deletion.
4 changes: 3 additions & 1 deletion lib/Demangling/OldRemangler.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -3051,5 +3051,7 @@ ManglingError Remangler::mangleHasSymbolQuery(Node *node, unsigned depth) {
ManglingError
Remangler::mangleDependentGenericInverseConformanceRequirement(Node *node,
unsigned depth) {
return MANGLING_ERROR(ManglingError::UnsupportedNodeKind, node);
DEMANGLER_ASSERT(node->getNumChildren() == 2, node);
RETURN_IF_ERROR(mangleConstrainedType(node->getChild(0), depth + 1));
return mangle(node->getChild(1), depth + 1);
}
11 changes: 11 additions & 0 deletions test/IRGen/non-copyable-class-mangling.swift
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
// RUN: %target-swift-frontend %s -emit-ir -o /dev/null

// Check that we don't crash on this in the old re-mangler.
// rdar://133333754

struct S<T> where T: ~Copyable {
final class C {
let x = 27
}
}

0 comments on commit 2b2b763

Please sign in to comment.