Skip to content

Commit 4fc5a73

Browse files
jketemaPaolo Tranquilli
authored andcommitted
Swift: Update mangling of OpenedArchetypeType
1 parent 1ac47a8 commit 4fc5a73

File tree

1 file changed

+5
-5
lines changed

1 file changed

+5
-5
lines changed

swift/extractor/mangler/SwiftMangler.cpp

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -6,8 +6,8 @@
66
#include <swift/AST/Module.h>
77
#include <swift/AST/ParameterList.h>
88
#include <swift/AST/ASTContext.h>
9+
#include <swift/AST/GenericEnvironment.h>
910
#include <swift/AST/GenericParamList.h>
10-
#include <sstream>
1111

1212
using namespace codeql;
1313

@@ -353,10 +353,10 @@ SwiftMangledName SwiftMangler::visitOpaqueTypeArchetypeType(
353353
}
354354

355355
SwiftMangledName SwiftMangler::visitOpenedArchetypeType(const swift::OpenedArchetypeType* type) {
356-
// llvm::SmallVector<char> uuid;
357-
// type->getOpenedExistentialID().toString(uuid); // <- doesn't compile any more
358-
// return visitArchetypeType(type) << std::string_view(uuid.data(), uuid.size());
359-
return visitArchetypeType(type);
356+
auto *env = type->getGenericEnvironment();
357+
llvm::SmallVector<char> uuid;
358+
env->getOpenedExistentialUUID().toString(uuid);
359+
return visitArchetypeType(type) << std::string_view(uuid.data(), uuid.size());
360360
}
361361

362362
SwiftMangledName SwiftMangler::visitProtocolCompositionType(

0 commit comments

Comments
 (0)