Skip to content

Commit 38416cf

Browse files
committed
ASTDemangler: Remove unnecessary calls to TypeAliasType::get()
1 parent 0ade7b7 commit 38416cf

File tree

1 file changed

+2
-6
lines changed

1 file changed

+2
-6
lines changed

lib/AST/ASTDemangler.cpp

Lines changed: 2 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -190,9 +190,7 @@ Type ASTBuilder::createTypeAliasType(GenericTypeDecl *decl, Type parent) {
190190
auto *dc = aliasDecl->getDeclContext();
191191
auto subs = parent->getContextSubstitutionMap(dc->getParentModule(), dc);
192192

193-
// FIXME: subst() should build the sugar for us
194-
declaredType = declaredType.subst(subs);
195-
return TypeAliasType::get(aliasDecl, parent, subs, declaredType);
193+
return declaredType.subst(subs);
196194
}
197195

198196
static SubstitutionMap
@@ -323,9 +321,7 @@ Type ASTBuilder::createBoundGenericType(GenericTypeDecl *decl,
323321
if (!subMap)
324322
return Type();
325323

326-
// FIXME: subst() should build the sugar for us
327-
auto declaredType = aliasDecl->getDeclaredInterfaceType().subst(subMap);
328-
return TypeAliasType::get(aliasDecl, parent, subMap, declaredType);
324+
return aliasDecl->getDeclaredInterfaceType().subst(subMap);
329325
}
330326

331327
Type ASTBuilder::createTupleType(ArrayRef<Type> eltTypes,

0 commit comments

Comments
 (0)