Skip to content

Commit f467295

Browse files
authored
[IRGen] Fix refcount bytes computation for single payload enums (#66216)
Nested ref count byte was accidentally counted as Int64, but should be Size
1 parent bbfd410 commit f467295

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

lib/IRGen/TypeLayout.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -218,8 +218,8 @@ class LayoutStringBuilder {
218218
nestedRefCountBytes);
219219
B.fillPlaceholderWithInt(skipBytesPlaceholder, IGM.SizeTy, nestedSkip);
220220

221-
refCountBytes += (4 * sizeof(uint64_t)) +
222-
(3 * IGM.getPointerSize().getValue()) +
221+
refCountBytes += (3 * sizeof(uint64_t)) +
222+
(4 * IGM.getPointerSize().getValue()) +
223223
nestedRefCountBytes;
224224
break;
225225
}

0 commit comments

Comments
 (0)