[PATCH] D140795: [Flang] Add user option -funderscoring/-fnounderscoring to enable/disable ExternalNameConversionPass
Andrzej Warzynski via Phabricator via cfe-commits
cfe-commits at lists.llvm.org
Sat Jan 7 08:46:35 PST 2023
awarzynski added a comment.
In D140795#4031392 <https://reviews.llvm.org/D140795#4031392>, @kkwli0 wrote:
> The purpose of this option is to control the trailing underscore being appended to external names (e.g. procedure names, common block names). The option in gfortran is documented in https://gcc.gnu.org/onlinedocs/gfortran/Code-Gen-Options.html.
Thanks for this explanation - much appreciated! Could this short description be added to the summary? Also, could you add a note stating whether the semantics of this option in Flang are consistent with GFortran. Ta!
> However, I don't think the patch does what we want. Given a procedure name `foo`, the `-fno-underscoring` option will give `_QPfoo` instead of `foo`. We will look into it.
Names in Flang are mangled at the FIR level. I couldn't find any documentation for this, but the ExternalNameConversion <https://github.com/llvm/llvm-project/blob/b6ceadf3b663427f3cc233bbfdb5e35017cabd9e/flang/include/flang/Optimizer/Transforms/Passes.td#L160-L166> pass could be helpful.
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D140795/new/
https://reviews.llvm.org/D140795
More information about the cfe-commits
mailing list