================
@@ -2675,6 +2687,15 @@ StringRef CodeGenModule::getMangledName(GlobalDecl GD) {
   //        "LLVM demangler must demangle clang-generated names");
 
   auto Result = Manglings.insert(std::make_pair(MangledName, GD));
+  if (!Result.second &&
+      areDistinctInternalGlobalModuleEntities(GD, Result.first->second)) {
+    unsigned Discriminator = 1;
+    do {
+      std::string UniqueName =
+          (Twine(MangledName) + "." + Twine(Discriminator++)).str();
+      Result = Manglings.insert(std::make_pair(UniqueName, GD));
+    } while (!Result.second);
----------------
ChuanqiXu9 wrote:

This mangling is not consistent with what we discussed before. The module 
partition name is not involved.

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

Reply via email to