[PATCH] D97447: Add GNU attribute 'retain'

2021-02-26 Thread Fangrui Song via Phabricator via cfe-commits
This revision was landed with ongoing or failed builds. This revision was automatically updated to reflect the committed changes. Closed by commit rG8afdacba9dcd: Add GNU attribute 'retain' (authored by MaskRay). Changed prior to commit: https://reviews.llvm.org/D97447?vs=326766&id=326839#toc

[PATCH] D97447: Add GNU attribute 'retain'

2021-02-26 Thread Fangrui Song via Phabricator via cfe-commits
MaskRay updated this revision to Diff 326766. MaskRay added a comment. Improve doc as rnk suggested. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D97447/new/ https://reviews.llvm.org/D97447 Files: clang/include/clang/Basic/Attr.td clang/includ

[PATCH] D97447: Add GNU attribute 'retain'

2021-02-26 Thread Reid Kleckner via Phabricator via cfe-commits
rnk accepted this revision. rnk added a comment. This revision is now accepted and ready to land. lgtm with a minor doc tweak My reading of the discussion is that this is ready, but please wait for others if you are aware of any outstanding concerns. Comment at: clang/include

[PATCH] D97447: Add GNU attribute 'retain'

2021-02-26 Thread Fangrui Song via Phabricator via cfe-commits
MaskRay added a comment. I have performed a large-scale internal test. I don't find any problem with a toolchain built with D97446 /D97447 /D97448 . Repository: rG LLVM Github Monorepo CHANGES

[PATCH] D97447: Add GNU attribute 'retain'

2021-02-25 Thread Fangrui Song via Phabricator via cfe-commits
MaskRay added inline comments. Comment at: clang/include/clang/Basic/AttrDocs.td:74 +COFF and Mach-O targets (Windows and Apple platforms), this attribute prevents +the definition and its symbol from being removed by the linker. On ELF +targets, it has no effect on its own, and

[PATCH] D97447: Add GNU attribute 'retain'

2021-02-25 Thread Fangrui Song via Phabricator via cfe-commits
MaskRay updated this revision to Diff 326513. MaskRay marked 2 inline comments as done. MaskRay added a comment. Improve documentation Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D97447/new/ https://reviews.llvm.org/D97447 Files: clang/include/

[PATCH] D97447: Add GNU attribute 'retain'

2021-02-25 Thread Reid Kleckner via Phabricator via cfe-commits
rnk added inline comments. Comment at: clang/include/clang/Basic/AttrDocs.td:74 +COFF and Mach-O targets (Windows and Apple platforms), this attribute prevents +the definition and its symbol from being removed by the linker. On ELF +targets, it has no effect on its own, and the

[PATCH] D97447: Add GNU attribute 'retain'

2021-02-24 Thread Fangrui Song via Phabricator via cfe-commits
MaskRay created this revision. MaskRay added reviewers: aaron.ballman, rjmccall, rnk, rsmith. Herald added a subscriber: pengfei. MaskRay requested review of this revision. Herald added a project: clang. Herald added a subscriber: cfe-commits. For ELF targets, GCC 11 will set SHF_GNU_RETAIN on the