[Libomptarget] Allow static assert to work on 32-bit systems
Summary: We use a static assert to make sure that someone doesn't change the size of an argument struct without properly updating all the other logic. This originally only checked the size on a 64-bit system with 8-byte pointers, causing builds on 32-bit systems to fail. This patch allows either pointer size to work. Fixes #56486
This commit is contained in:
parent
13019955bf
commit
b1d574867d
|
@ -121,7 +121,9 @@ struct __tgt_kernel_arguments {
|
|||
void **ArgMappers; // User-defined mappers, possibly null.
|
||||
int64_t Tripcount; // Tripcount for the teams / distribute loop, 0 otherwise.
|
||||
};
|
||||
static_assert(sizeof(__tgt_kernel_arguments) == 64, "Invalid struct size");
|
||||
static_assert(sizeof(__tgt_kernel_arguments) == 64 ||
|
||||
sizeof(__tgt_kernel_arguments) == 40,
|
||||
"Invalid struct size");
|
||||
|
||||
/// This struct is a record of an entry point or global. For a function
|
||||
/// entry point the size is expected to be zero
|
||||
|
|
Loading…
Reference in a new issue