[llvm] [llvm] don't merge constants with COMDAT (PR #192477)

Alexis Engelke via llvm-commits llvm-commits at lists.llvm.org
Fri Apr 17 10:10:12 PDT 2026


================
@@ -85,6 +85,7 @@ isUnmergeableGlobal(GlobalVariable *GV,
   // Only process constants with initializers in the default address space.
   return !GV->isConstant() || !GV->hasDefinitiveInitializer() ||
          GV->getType()->getAddressSpace() != 0 || GV->hasSection() ||
+         GV->hasComdat() ||
----------------
aengelke wrote:

Add brief comment to explain why.

https://github.com/llvm/llvm-project/pull/192477


More information about the llvm-commits mailing list