[clang] [Sema] Provide `-fno-/-fvisibility-global-new-delete` option (PR #75364)
Paul T Robinson via cfe-commits
cfe-commits at lists.llvm.org
Mon Dec 18 10:52:12 PST 2023
pogo59 wrote:
>From a UI perspective, "add a visibility attribute" doesn't seem all that descriptive. What visibility does it add? Therefore, I suggest `-fvisibility-global-new-delete[=<visibility>]` so the user can ask for what they want, and `-fvisibility-global-new-delete-hidden` equals `-fvisibility-global-new-delete=hidden`. The help text can indicate that the default is `default`.
I'm unclear what the `-fno` variant actually turns into. There's always a visibility, ultimately, right? So wouldn't that be equivalent to the `keep` option in #74629 ? Which suggests not having the `-fno` variant here, and allowing `=keep` instead.
(If the universe would implode given a visibility other than `default` or `hidden` for global new/delete, then constrain the argument to the option to be only `default/hidden/keep`.)
I hope this makes sense...
https://github.com/llvm/llvm-project/pull/75364
More information about the cfe-commits
mailing list