================
@@ -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();
----------------
kaviya2510 wrote:

Your understanding is correct. The `hash.empty()` check is necessary because 
the hash is only populated when `-funique-internal-linkage-names` is passed.

When this option `funique-internal-linkage-names` is not used, hash remains 
empty and this check prevents appending an empty string (harmless but 
unnecessary) and makes it clear that the suffix is only added when the flag is 
passed.

https://github.com/llvm/llvm-project/pull/216680
_______________________________________________
cfe-commits mailing list
[email protected]
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

Reply via email to