File tree Expand file tree Collapse file tree 1 file changed +8
-0
lines changed Expand file tree Collapse file tree 1 file changed +8
-0
lines changed Original file line number Diff line number Diff line change @@ -296,6 +296,14 @@ std::string DeclVisitor::mangledName(const swift::ValueDecl& decl) {
296
296
if (decl.getKind () == swift::DeclKind::Module) {
297
297
return static_cast <const swift::ModuleDecl&>(decl).getRealName ().str ().str ();
298
298
}
299
+ // In cases like this (when coming from PCM)
300
+ // typealias CFXMLTree = CFTree
301
+ // typealias CFXMLTreeRef = CFXMLTree
302
+ // mangleAnyDecl mangles both CFXMLTree and CFXMLTreeRef into 'So12CFXMLTreeRefa'
303
+ // which is not correct and causes inconsistencies. mangleEntity makes these two distinct
304
+ if (decl.getKind () == swift::DeclKind::TypeAlias) {
305
+ return mangler.mangleEntity (&decl);
306
+ }
299
307
// prefix adds a couple of special symbols, we don't necessary need them
300
308
return mangler.mangleAnyDecl (&decl, /* prefix = */ false );
301
309
}
You can’t perform that action at this time.
0 commit comments