llvm: correct calculation of index of zero-bit field
If the field comes before any non-zero-bit field then the index of the next field should be returned. Closes #13363
This commit is contained in:
@@ -10216,7 +10216,7 @@ fn llvmFieldIndex(
|
||||
llvm_field_index += 1;
|
||||
}
|
||||
|
||||
if (field_index == i) {
|
||||
if (field_index <= i) {
|
||||
ptr_pl_buf.* = .{
|
||||
.data = .{
|
||||
.pointee_type = field_ty,
|
||||
@@ -10249,7 +10249,7 @@ fn llvmFieldIndex(
|
||||
llvm_field_index += 1;
|
||||
}
|
||||
|
||||
if (field_index == i) {
|
||||
if (field_index <= i) {
|
||||
ptr_pl_buf.* = .{
|
||||
.data = .{
|
||||
.pointee_type = field.ty,
|
||||
|
||||
Reference in New Issue
Block a user