Skip to content

Commit e6d282f

Browse files
authored
[IRGen] Fix symbol generation for getEnumTag function for layout strings (#66845)
The type needs to be cleaned up to prevent issues with mangling when it contains archetypes
1 parent e064d23 commit e6d282f

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

lib/IRGen/TypeLayout.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -501,7 +501,7 @@ llvm::Function *createFixedEnumLoadTag(IRGenModule &IGM,
501501

502502
IRGenMangler mangler;
503503
auto symbol = mangler.mangleSymbolNameForMangledGetEnumTagForLayoutString(
504-
entry.ty.getASTType());
504+
entry.ty.getASTType()->mapTypeOutOfContext()->getCanonicalType());
505505

506506
auto helperFn = IGM.getOrCreateHelperFunction(
507507
symbol, IGM.Int32Ty /*retTy*/, IGM.Int8PtrTy /*argTys*/,

0 commit comments

Comments
 (0)