@@ -160,6 +160,9 @@ SwiftMangledName SwiftMangler::visitBuiltinType(const swift::BuiltinType* type)
160160SwiftMangledName SwiftMangler::visitAnyGenericType (const swift::AnyGenericType* type) {
161161 auto ret = initMangled (type);
162162 ret << dispatcher.fetchLabel (type->getDecl ());
163+ if (auto parent = type->getParent ()) {
164+ ret << dispatcher.fetchLabel (parent);
165+ }
163166 return ret;
164167}
165168
@@ -284,6 +287,9 @@ SwiftMangledName SwiftMangler::visitDictionaryType(const swift::DictionaryType*
284287SwiftMangledName SwiftMangler::visitTypeAliasType (const swift::TypeAliasType* type) {
285288 auto ret = initMangled (type);
286289 ret << dispatcher.fetchLabel (type->getDecl ());
290+ for (auto replacement : type->getSubstitutionMap ().getReplacementTypes ()) {
291+ ret << dispatcher.fetchLabel (replacement);
292+ }
287293 return ret;
288294}
289295
@@ -293,3 +299,45 @@ SwiftMangledName SwiftMangler::visitArchetypeType(const swift::ArchetypeType* ty
293299 ret << dispatcher.fetchLabel (type->getInterfaceType ());
294300 return ret;
295301}
302+
303+ SwiftMangledName SwiftMangler::visitProtocolCompositionType (
304+ const swift::ProtocolCompositionType* type) {
305+ auto ret = initMangled (type);
306+ for (auto composed : type->getMembers ()) {
307+ ret << dispatcher.fetchLabel (composed);
308+ }
309+ if (type->hasExplicitAnyObject ()) {
310+ ret << " &AnyObject" ;
311+ }
312+ return ret;
313+ }
314+
315+ SwiftMangledName SwiftMangler::visitParenType (const swift::ParenType* type) {
316+ auto ret = initMangled (type);
317+ ret << dispatcher.fetchLabel (type->getUnderlyingType ());
318+ return ret;
319+ }
320+
321+ SwiftMangledName SwiftMangler::visitLValueType (const swift::LValueType* type) {
322+ auto ret = initMangled (type);
323+ ret << dispatcher.fetchLabel (type->getObjectType ());
324+ return ret;
325+ }
326+
327+ SwiftMangledName SwiftMangler::visitDynamicSelfType (const swift::DynamicSelfType* type) {
328+ auto ret = initMangled (type);
329+ ret << dispatcher.fetchLabel (type->getSelfType ());
330+ return ret;
331+ }
332+
333+ SwiftMangledName SwiftMangler::visitUnboundGenericType (const swift::UnboundGenericType* type) {
334+ auto ret = initMangled (type);
335+ ret << dispatcher.fetchLabel (type->getDecl ());
336+ return ret;
337+ }
338+
339+ SwiftMangledName SwiftMangler::visitReferenceStorageType (const swift::ReferenceStorageType* type) {
340+ auto ret = initMangled (type);
341+ ret << dispatcher.fetchLabel (type->getReferentType ());
342+ return ret;
343+ }
0 commit comments