Skip to content

Commit c50c2cd

Browse files
committed
Fix crash on systems with pointer authentication.
hashStringForType() needed updating to deal with ExistentialType. rdar://87717024
1 parent cbcaff4 commit c50c2cd

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

lib/IRGen/GenPointerAuth.cpp

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -441,6 +441,10 @@ static void hashStringForType(IRGenModule &IGM, CanType Ty, raw_ostream &Out,
441441
hashStringForType(IGM, UnwrappedTy->getCanonicalType(), Out, genericEnv);
442442
Out << ">";
443443
}
444+
} else if (auto ETy = dyn_cast<ExistentialType>(Ty)) {
445+
// Look through existential types
446+
hashStringForType(IGM, ETy->getConstraintType()->getCanonicalType(),
447+
Out, genericEnv);
444448
} else if (auto GTy = dyn_cast<AnyGenericType>(Ty)) {
445449
// For generic and non-generic value types, use the mangled declaration
446450
// name, and ignore all generic arguments.

0 commit comments

Comments
 (0)