Skip to content

Commit 7c7ad18

Browse files
committed
Consistently treat payloads with missing/invalid typeinfo as non-empty.
1 parent 283c656 commit 7c7ad18

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

include/swift/RemoteInspection/TypeLowering.h

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -243,8 +243,11 @@ class EnumTypeInfo : public TypeInfo {
243243
auto Cases = getCases();
244244
return std::count_if(Cases.begin(), Cases.end(),
245245
[](const FieldInfo &Case){
246+
// For our purposes here, assume any case
247+
// with invalid (missing) typeinfo is non-empty
246248
return Case.TR != 0
247-
&& Case.TI.getSize() != 0;
249+
&& (Case.TI.getKind() == TypeInfoKind::Invalid
250+
|| Case.TI.getSize() > 0);
248251
});
249252
}
250253
// Size of the payload area.

0 commit comments

Comments
 (0)