diff --git a/lib/Demangling/OldRemangler.cpp b/lib/Demangling/OldRemangler.cpp index dfc27c9b15dcb..d4b1932a47a35 100644 --- a/lib/Demangling/OldRemangler.cpp +++ b/lib/Demangling/OldRemangler.cpp @@ -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); } diff --git a/test/IRGen/non-copyable-class-mangling.swift b/test/IRGen/non-copyable-class-mangling.swift new file mode 100644 index 0000000000000..5319af6cd5fc6 --- /dev/null +++ b/test/IRGen/non-copyable-class-mangling.swift @@ -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 where T: ~Copyable { + final class C { + let x = 27 + } +} +