[clang] [Sema] Provide `-fvisibility-global-new-delete=` option (PR #75364)
Fangrui Song via cfe-commits
cfe-commits at lists.llvm.org
Fri Jan 19 14:24:23 PST 2024
================
@@ -3864,9 +3864,16 @@ def fvisibility_ms_compat : Flag<["-"], "fvisibility-ms-compat">, Group<f_Group>
HelpText<"Give global types 'default' visibility and global functions and "
"variables 'hidden' visibility by default">;
def fvisibility_global_new_delete_hidden : Flag<["-"], "fvisibility-global-new-delete-hidden">, Group<f_Group>,
- HelpText<"Give global C++ operator new and delete declarations hidden visibility">,
+ HelpText<"Give global C++ operator new and delete declarations hidden visibility">;
+class MarshallingInfoVisibilityGlobalNewDelete<KeyPathAndMacro kpm, code default>
+ : MarshallingInfoEnum<kpm, default>,
+ Values<"force-default,force-protected,force-hidden,source">,
+ NormalizedValuesScope<"LangOptions::VisibilityForcedKinds">,
+ NormalizedValues<["ForceDefault", "ForceProtected", "ForceHidden", "Source"]> {}
+def fvisibility_global_new_delete_EQ : Joined<["-"], "fvisibility-global-new-delete=">, Group<f_Group>,
Visibility<[ClangOption, CC1Option]>,
- MarshallingInfoFlag<LangOpts<"GlobalAllocationFunctionVisibilityHidden">>;
+ HelpText<"The visibility for global C++ operator new and delete declarations definitions. If source is specified the visibility is not adjusted">,
----------------
MaskRay wrote:
Single quotes around `source`
https://github.com/llvm/llvm-project/pull/75364
More information about the cfe-commits
mailing list