mirror of
https://github.com/apple/swift.git
synced 2025-12-21 12:14:44 +01:00
[Serialization] Use decl mangling for local decls, not type mangling. (#10022)
Otherwise we get an error with local generic types. We don't need the complexity of type mangling anyway. https://bugs.swift.org/browse/SR-5038
This commit is contained in:
@@ -4468,8 +4468,7 @@ void Serializer::writeAST(ModuleOrSourceFile DC,
|
||||
for (auto TD : localTypeDecls) {
|
||||
hasLocalTypes = true;
|
||||
Mangle::ASTMangler Mangler;
|
||||
std::string MangledName = Mangler.mangleTypeAsUSR(
|
||||
TD->getDeclaredInterfaceType());
|
||||
std::string MangledName = Mangler.mangleDeclAsUSR(TD, /*USRPrefix*/"");
|
||||
assert(!MangledName.empty() && "Mangled type came back empty!");
|
||||
localTypeGenerator.insert(MangledName, {
|
||||
addDeclRef(TD), TD->getLocalDiscriminator()
|
||||
|
||||
Reference in New Issue
Block a user