Skip to content

Commit 283c656

Browse files
committed
Match the earlier behavior when we lack typeinfo
for a particular payload. This should fix a test crash that occurred on x86_64 with CF payloads.
1 parent f087b5e commit 283c656

File tree

1 file changed

+7
-1
lines changed

1 file changed

+7
-1
lines changed

stdlib/public/RemoteInspection/TypeLowering.cpp

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2051,7 +2051,13 @@ class EnumTypeInfoBuilder {
20512051
auto *CaseTR = getCaseTypeRef(Case);
20522052
assert(CaseTR != nullptr);
20532053
auto *CaseTI = TC.getTypeInfo(CaseTR, ExternalTypeInfo);
2054-
if (CaseTI->getSize() == 0) {
2054+
if (CaseTI == nullptr) {
2055+
// We don't have typeinfo; assume it's not
2056+
// zero-sized to match earlier behavior.
2057+
// TODO: Maybe this should prompt us to fall
2058+
// back to UnsupportedEnumTypeInfo??
2059+
PayloadCases.push_back(Case);
2060+
} else if (CaseTI->getSize() == 0) {
20552061
// Zero-sized payloads get special treatment
20562062
++EmptyPayloadCases;
20572063
} else {

0 commit comments

Comments
 (0)