aboutsummaryrefslogtreecommitdiff
path: root/llvm/lib/Object/TapiFile.cpp
diff options
context:
space:
mode:
authorPeter Klausler <pklausler@nvidia.com>2022-02-04 18:04:58 -0800
committerPeter Klausler <pklausler@nvidia.com>2022-02-10 10:29:36 -0800
commit93b0638eff586fabb38c18e8bb34c89661e525e5 (patch)
tree9ecf8ffd6314e73f16c3103e37e6fba5965e1a05 /llvm/lib/Object/TapiFile.cpp
parentbd3a1de683f80d174ea9c97000db3ec3276bc022 (diff)
downloadllvm-93b0638eff586fabb38c18e8bb34c89661e525e5.zip
llvm-93b0638eff586fabb38c18e8bb34c89661e525e5.tar.gz
llvm-93b0638eff586fabb38c18e8bb34c89661e525e5.tar.bz2
[flang] Handle "type(foo) function f" when foo is defined in f
Fortran allows forward references to derived types, including function results that are typed in a prefix of a FUNCTION statement. If a type is defined in the body of the function, a reference to that type from a prefix on the FUNCTION statement must resolve to the local symbol, even and especially when that type shadows one from the host scope. The solution is to defer the processing of that type until the end of the function's specification part. But the language doesn't allow for forward references to other names in the prefix, so defer the processing of the type only when it is not an intrinsic type. The data structures in name resolution that track this information for functions needed to become a stack in order to make this work, since functions can contain interfaces that are functions. Differential Revision: https://reviews.llvm.org/D119448
Diffstat (limited to 'llvm/lib/Object/TapiFile.cpp')
0 files changed, 0 insertions, 0 deletions