@@ -886,49 +886,8 @@ void ASTMangler::appendType(Type type) {
886
886
return appendImplFunctionType (cast<SILFunctionType>(tybase));
887
887
888
888
// type ::= archetype
889
- case TypeKind::Archetype: {
890
- auto *archetype = cast<ArchetypeType>(tybase);
891
-
892
- assert (false && DWARFMangling && " Cannot mangle free-standing archetypes" );
893
-
894
- // Mangle the associated type of a parent archetype.
895
- if (auto parent = archetype->getParent ()) {
896
- assert (archetype->getAssocType ()
897
- && " child archetype has no associated type?!" );
898
-
899
- if (tryMangleSubstitution (archetype))
900
- return ;
901
- appendType (parent);
902
- appendIdentifier (archetype->getName ().str ());
903
- appendOperator (" Qa" );
904
- addSubstitution (archetype);
905
- return ;
906
- }
907
-
908
- // archetype ::= 'Q' <index> # archetype with depth=0, index=N
909
- // archetype ::= 'Qd' <index> <index> # archetype with depth=M+1, index=N
910
- // Mangle generic parameter archetypes.
911
-
912
- // Find the archetype information.
913
- const DeclContext *DC = DeclCtx;
914
- auto GTPT = archetype->getInterfaceType ()->castTo <GenericTypeParamType>();
915
-
916
- // The DWARF output created by Swift is intentionally flat,
917
- // therefore archetypes are emitted with their DeclContext if
918
- // they appear at the top level of a type.
919
- DWARFMangling = false ;
920
- while (DC && DC->isGenericContext ()) {
921
- if (DC->isInnermostContextGeneric () &&
922
- DC->getGenericParamsOfContext ()->getDepth () == GTPT->getDepth ())
923
- break ;
924
- DC = DC->getParent ();
925
- }
926
- assert (DC && " no decl context for archetype found" );
927
- if (!DC) return ;
928
- appendContext (DC);
929
- DWARFMangling = true ;
930
- return appendOperator (" Qq" , Index (GTPT->getIndex ()));
931
- }
889
+ case TypeKind::Archetype:
890
+ llvm_unreachable (" Cannot mangle free-standing archetypes" );
932
891
933
892
case TypeKind::DynamicSelf: {
934
893
auto dynamicSelf = cast<DynamicSelfType>(tybase);
0 commit comments