[PATCH] D40925: Add option -fkeep-static-consts

Erich Keane via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Tue Feb 13 15:54:42 PST 2018


erichkeane added a comment.

>> OK. My concern is that users need to use __attribute__((used)) or something more robust if they want SVN identifiers to reliably appear in the output. Adding this flag just creates a trap that will fail once they turn on >>-O2. I'd rather not have it in the interface to avoid that user confusion.

Since the idea here is to have a global option for 'always emit these things', could a viable solution simply add all of these things to @llvm.used.  This wouldn't affect the usefulness of __attribute((used)), but could be implemented similarly, right?


https://reviews.llvm.org/D40925





More information about the cfe-commits mailing list