[clang] Add option -fstdlib-hardening= (PR #78763)

Akira Hatanaka via cfe-commits cfe-commits at lists.llvm.org
Mon Jan 22 01:34:20 PST 2024


================
@@ -7730,6 +7730,14 @@ def source_date_epoch : Separate<["-"], "source-date-epoch">,
 
 } // let Visibility = [CC1Option]
 
+def stdlib_hardening_EQ : Joined<["-"], "fstdlib-hardening=">,
+  Values<"none,fast,extensive,debug">,
+  NormalizedValues<["STDLIB_HARDENING_MODE_NONE", "STDLIB_HARDENING_MODE_FAST", "STDLIB_HARDENING_MODE_EXTENSIVE", "STDLIB_HARDENING_MODE_DEBUG"]>,
+  Visibility<[ClangOption, CC1Option]>,
+  HelpText<"standard library hardening mode">,
+  NormalizedValuesScope<"LangOptions">,
+  MarshallingInfoEnum<LangOpts<"StdlibHardeningMode">, "STDLIB_HARDENING_MODE_NOT_SPECIFIED">;
----------------
ahatanak wrote:

Isn't `DocName` only for `OptionGroup`?
https://github.com/llvm/llvm-project/blob/ac296b696ccf3081b2fc920f860da894fb1d8eb0/clang/utils/TableGen/ClangOptionDocEmitter.cpp#L393

Do you mean `DocBrief`?

https://github.com/llvm/llvm-project/pull/78763


More information about the cfe-commits mailing list