aboutsummaryrefslogtreecommitdiff
path: root/llvm/lib/IR/Function.cpp
diff options
context:
space:
mode:
authorValentin Clement <clementval@gmail.com>2022-06-22 20:46:30 +0200
committerValentin Clement <clementval@gmail.com>2022-06-22 20:47:23 +0200
commit10b23ae880f9ee0188d7ee97b7fc25243aa0c854 (patch)
tree582271d299bf20d6e28c6f141b883b1174ca628f /llvm/lib/IR/Function.cpp
parentf7d434ef294b335ae90c83d5dda804ce4a3ea6f5 (diff)
downloadllvm-10b23ae880f9ee0188d7ee97b7fc25243aa0c854.zip
llvm-10b23ae880f9ee0188d7ee97b7fc25243aa0c854.tar.gz
llvm-10b23ae880f9ee0188d7ee97b7fc25243aa0c854.tar.bz2
[flang] Handle BINC(C) variables and add TODO for corner cases
- BIND(C) was ignored in lowering for objects (it can be used on module and common blocks): use the bind name as the fir.global name. - When an procedure is declared BIND(C) indirectly via an interface, it should have a BIND(C) name. This was not the case because GetBindName()/bindingName() return nothing in this case: detect this case in mangler.cpp and use the symbol name. Add TODOs for corner cases: - BIND(C) module variables may be initialized on the C side. This does not fit well with the current linkage strategy. Add a TODO until this is revisited. - BIND(C) internal procedures should not have a binding label (see Fortran 2018 section 18.10.2 point 2), yet we currently lower them as if they were BIND(C) external procedure. I think this and the indirect interface case should really be handled by symbol.GetBindName instead of adding more logic in lowering to deal with this case: add a TODO. This patch is part of the upstreaming effort from fir-dev branch. Reviewed By: klausler Differential Revision: https://reviews.llvm.org/D128340 Co-authored-by: Jean Perier <jperier@nvidia.com>
Diffstat (limited to 'llvm/lib/IR/Function.cpp')
0 files changed, 0 insertions, 0 deletions