[flang][OpenMP] Lower iterator modifiers in DECLARE MAPPER map clauses (#241358)
A user-defined mapper often maps only selected elements of its variable,
such as `map(iterator(i = 1:v%n), to: v%a(i))`, so that every use of the
type transfers just that data. Iterator modifiers already lower in the
map and motion clauses of TARGET DATA, TARGET ENTER/EXIT DATA, and
TARGET UPDATE; this patch lowers them inside DECLARE MAPPER as well.
Inside a mapper, an iterator-dependent locator may be a component of the
mapper variable, and its ranges and subscripts may refer only to the
mapper variable and the iterators. Other references, and mapper bodies
that need control flow or values from the enclosing procedure, are
reported as not yet implemented. Implicit default mappers, and TARGET
ENTER/EXIT DATA maps without a mapper, do not yet apply the default
mappers of component types; in host offload compilation, lowering
reports such a map when a skipped mapper has an iterator modifier.
Two changes also affect mappers without iterators: cleanups are emitted
inside the mapper region, and array elements in mappers read from module
files no longer crash lowering.
LLVM IR translation of these mappers follows in #235491. Until then, a
TARGET construct that uses one reports not yet implemented, which relies
on #240993.
Assisted with Claude Opus 5.5.