mirror of
https://github.com/apple/swift.git
synced 2025-12-14 20:36:38 +01:00
Mangling: wire up the new mangling in various places in the compiler, but still use the old mangling.
The purpose of this change is to test if the new mangling is equivalent to the old mangling. Both mangling strings are created, de-mangled and checked if the de-mangle trees are equivalent.
This commit is contained in:
@@ -198,7 +198,12 @@ static bool extendedTypeIsPrivate(TypeLoc inheritedType) {
|
||||
static std::string mangleTypeAsContext(const NominalTypeDecl *type) {
|
||||
Mangle::Mangler mangler(/*debug style=*/false, /*Unicode=*/true);
|
||||
mangler.mangleContext(type);
|
||||
return mangler.finalize();
|
||||
std::string Old = mangler.finalize();
|
||||
|
||||
NewMangling::ASTMangler NewMangler(/*debug style=*/false, /*Unicode=*/true);
|
||||
std::string New = NewMangler.mangleTypeAsContextUSR(type);
|
||||
|
||||
return NewMangling::selectMangling(Old, New);
|
||||
}
|
||||
|
||||
/// Emits a Swift-style dependencies file.
|
||||
|
||||
Reference in New Issue
Block a user