[PATCH] D140795: [Flang] Add user option -funderscoring/-fnounderscoring to enable/disable ExternalNameConversionPass
Kelvin Li via Phabricator via cfe-commits
cfe-commits at lists.llvm.org
Tue Jan 10 13:43:49 PST 2023
kkwli0 added a comment.
In D140795#4033559 <https://reviews.llvm.org/D140795#4033559>, @awarzynski wrote:
>> 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.
@awarzynski Thanks for the info. We intend to make use of `ExternalNameConversion` for this purpose. However, we are not sure how a compiler option can control the behavior in `ExternalNameConversion`. Any pointer to how other passes do it is appreciated.
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