aboutsummaryrefslogtreecommitdiff
path: root/clang/lib/CodeGen
diff options
context:
space:
mode:
authorjeanPerier <jperier@nvidia.com>2024-10-14 09:35:29 +0200
committerGitHub <noreply@github.com>2024-10-14 09:35:29 +0200
commit367c3c968eb8f29b55fb8019b2464c7ff6307ca8 (patch)
tree2bce6e1592d358afdea60b9aa97b1487658d9eab /clang/lib/CodeGen
parent102f76b2d7c8609755f4453c5f91f7fe12e2c0c6 (diff)
downloadllvm-367c3c968eb8f29b55fb8019b2464c7ff6307ca8.zip
llvm-367c3c968eb8f29b55fb8019b2464c7ff6307ca8.tar.gz
llvm-367c3c968eb8f29b55fb8019b2464c7ff6307ca8.tar.bz2
[flang] correctly deal with bind(c) derived type result ABI (#111969)
Derived type results of BIND(C) function should be returned according the the C ABI for returning the related C struct type. This currently did not happen since the abstract-result pass was forcing the Fortran ABI for all derived type results. use the bind_c attribute that was added on call/func/dispatch in FIR to prevent such rewrite in the abstract result pass, and update the target-rewrite pass to deal with the struct return ABI. So far, the target specific part of the target-rewrite is only implemented for X86-64 according to the "System V Application Binary Interface AMD64 v1", the other targets will hit a TODO, just like for BIND(C), VALUE derived type arguments. This intends to deal with #102113. This is a re-land of #111678 with an extra commit to keep rewriting `type(c_ptr)` results to `!fir.ref<none>` in the abstract result pass regardless of the ABIs.
Diffstat (limited to 'clang/lib/CodeGen')
0 files changed, 0 insertions, 0 deletions