forked from Imagelibrary/binutils-gdb
Pass alignment when using GCC_C_FE_VERSION_2
When the GCC compiler plugin responds with GCC_C_FE_VERSION_2, gdb can use the new 'finish_record_with_alignment' method. This lets gdb pass alignment information to the compiler, which in turn fixes the test case included in this patch. Bug: https://sourceware.org/bugzilla/show_bug.cgi?id=31397
This commit is contained in:
@@ -118,7 +118,11 @@ convert_struct_or_union (compile_c_instance *context, struct type *type)
|
||||
type->field (i).loc_bitpos ());
|
||||
}
|
||||
|
||||
context->plugin ().finish_record_or_union (result, type->length ());
|
||||
if (context->plugin ().version () >= GCC_C_FE_VERSION_2)
|
||||
context->plugin ().finish_record_with_alignment (result, type->length (),
|
||||
type_align (type));
|
||||
else
|
||||
context->plugin ().finish_record_or_union (result, type->length ());
|
||||
return result;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user