[flang] Lower VALUE derived types in BIND(C) interface (#74847)
VALUE derived type are passed by reference outside of BIND(C) interface. The ABI is much simpler and it is possible for these arguments to have the OPTIONAL attribute. In the BIND(C) context, these arguments must follow the C ABI for struct, which may lead the data to be passed in register. OPTIONAL is also forbidden for those arguments, so it is safe to directly use the fir.type<T> type for the func.func argument. Codegen is in charge of later applying the C passing ABI according to the target (https://github.com/llvm/llvm-project/pull/74829).
Loading
Please sign in to comment