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
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