[PATCH] D106228: [LTO] Add SelectionKind to IRSymtab and use it in ld.lld/LLVMgold

Teresa Johnson via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Tue Jul 20 11:49:43 PDT 2021


tejohnson accepted this revision.
tejohnson added a comment.
This revision is now accepted and ready to land.

lgtm with a comment follow on request below.



================
Comment at: llvm/tools/gold/gold-plugin.cpp:626
     if (CI != -1) {
-      StringRef C = Obj->getComdatTable()[CI];
-      sym.comdat_key = strdup(C.str().c_str());
+      // noduplicates suppresses deduplication, so comdat_key should not be set.
+      std::pair<StringRef, Comdat::SelectionKind> C = Obj->getComdatTable()[CI];
----------------
I guess what I was looking for was more of a comment connecting how not setting comdat_key ensures we don't deduplicate.


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D106228/new/

https://reviews.llvm.org/D106228



More information about the llvm-commits mailing list