[PATCH] D117767: [flang] Fix checking of undefined variables in wrapper.
Andrzej Warzynski via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Mon Jan 24 05:32:02 PST 2022
awarzynski added a comment.
Hi @ygribov, thank you for this fix!
In D117767#3257668 <https://reviews.llvm.org/D117767#3257668>, @ygribov wrote:
> I realize that the wrapper may be removed in few months so let me know if this is irrelevant.
While this is "in-tree", all fixes are relevant :) Also, the main goal is to rename `flang-new` (Flang's compiler driver) as `flang` and this script as e.g. `flang-to-gfortran`. I hope that this will happen sooner rather than later - `flang` is a rather misleading name in this case. This does not mean that this script will be deleted - if people find it useful, then it may remain available as an option (albeit under a different name). Time will tell. I will definitely be in favor of removing it :)
As for your patch, I think that it would make a lot of sense to extract the following into a separate function (e.g. `get_external_fc_name` or something similar):
local ext_fc=""
if [[ -v FLANG_FC ]]; then
ext_fc="${FLANG_FC}"
elif [[ -v F18_FC ]]; then
# We support F18_FC for backwards compatibility.
ext_fc="${F18_FC}"
else
ext_fc=gfortran
fi
This way you will reduce code duplication.
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D117767/new/
https://reviews.llvm.org/D117767
More information about the llvm-commits
mailing list