[Mlir-commits] [clang] [flang] [mlir] [Flang][Driver] Added support for -funique-internal-linkage-names option (PR #216680)
Tarun Prabhu
llvmlistbot at llvm.org
Mon Aug 24 07:15:45 PDT 2026
================
@@ -1220,9 +1220,15 @@ class FirConverter : public Fortran::lower::AbstractConverter {
}
std::string
mangleName(const Fortran::semantics::Symbol &symbol) override final {
- return Fortran::lower::mangle::mangleName(
+ std::string mangledName = Fortran::lower::mangle::mangleName(
symbol, scopeBlockIdMap, /*keepExternalInScope=*/false,
getLoweringOptions().getUnderscoring());
+ const auto &hash = bridge.getModuleNameHash();
----------------
tarunprabhu wrote:
Just to clarify, this works because internal procedures within a module are already guaranteed to have distinct names. Adding a hash ensures that these names do not clash across modules, right? If they do clash, the only adverse consequence is that their profiles will get merged? I am wondering if the `hash.empty()` check is really necessary here.
https://github.com/llvm/llvm-project/pull/216680
More information about the Mlir-commits
mailing list