mirror of
https://github.com/apple/swift.git
synced 2025-12-21 12:14:44 +01:00
Mangling: prepare for using new mangling for USR and debug-info type generation.
Select between old and new mangling as we already do in other places in the compiler. NFC as long as the new mangling is not enabled yet.
This commit is contained in:
@@ -18,7 +18,7 @@
|
||||
//
|
||||
//===----------------------------------------------------------------------===//
|
||||
|
||||
#include "swift/AST/Mangle.h"
|
||||
#include "swift/AST/ASTMangler.h"
|
||||
#include "swift/SIL/SILDefaultWitnessTable.h"
|
||||
#include "swift/SIL/SILModule.h"
|
||||
#include "llvm/ADT/SmallString.h"
|
||||
@@ -100,12 +100,8 @@ convertToDefinition(ArrayRef<Entry> entries) {
|
||||
}
|
||||
|
||||
Identifier SILDefaultWitnessTable::getIdentifier() const {
|
||||
std::string name;
|
||||
{
|
||||
Mangle::Mangler mangler;
|
||||
mangler.mangleType(getProtocol()->getDeclaredType(), /*uncurry*/ 0);
|
||||
name = mangler.finalize();
|
||||
}
|
||||
std::string name = NewMangling::mangleTypeAsUSR(
|
||||
getProtocol()->getDeclaredType());
|
||||
return Mod.getASTContext().getIdentifier(name);
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user