[llvm] [Linker] Do not keep a private member of a non-prevailing comdat group (PR #69143)

Igor Kudrin via llvm-commits llvm-commits at lists.llvm.org
Fri Oct 27 16:47:04 PDT 2023


================
@@ -473,6 +474,9 @@ bool ModuleLinker::run() {
       return true;
     ComdatsChosen[&C] = std::make_pair(SK, From);
 
+    if (From == LinkFrom::Dst)
----------------
igorkudrin wrote:

If I remember it right, `LinkFrom::Both` corresponds to `comdat nodeduplicate`, while `comdat-refer-to-discarded.ll` uses `comdat any`. Do you think the interpretation of a comdat selection type should depend on the target platform (COFF vs ELF)?

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


More information about the llvm-commits mailing list