[PATCH] D96838: Add GNU attribute 'retain'

Reid Kleckner via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Tue Feb 23 10:06:42 PST 2021


rnk added a comment.

It should be possible to make retain work on COFF for internal linkage things by emitting a non-comdat section, even when /Gy / -ffunction/data-sections are enabled. That's complicated if the thing being retained is in a comdat group, but I think it's doable. If the group is being retained and the leader is internal, then all of the sections in the group should be retained by GC, and none of them need to be marked comdat, and they won't participate in GC.


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D96838



More information about the cfe-commits mailing list