[NFCI][OpenMP][OMPT] Move `for_static_init` work callbacks into macro (#217259)

`__kmp_for_static_init` uses a very similar pattern for dispatching the
work callback to an attached tool throughout the function. Hence, avoid
the duplication by moving the pattern into a macro, taking the number of
loop iterations as an argument. Without OMPT, this macro is a no-op.

Signed-off-by: Jan André Reuter <jan@zyten.de>
GitOrigin-RevId: 0b2e935b198a58439a42c2fda15819bcfea93b16
1 file changed