[clang] [Clang][Driver] Add new flags to control machine instruction verification (PR #70282)

Fangrui Song via cfe-commits cfe-commits at lists.llvm.org
Wed Oct 25 20:30:44 PDT 2023


================
@@ -1926,6 +1926,12 @@ def fverify_intermediate_code : Flag<["-"], "fverify-intermediate-code">,
 def fno_verify_intermediate_code : Flag<["-"], "fno-verify-intermediate-code">,
   Group<f_clang_Group>, Visibility<[ClangOption, CLOption, DXCOption]>,
   HelpText<"Disable verification of LLVM IR">, Flags<[NoXarchOption]>;
+def fverify_machine_code : Flag<["-"], "fverify-machine-code">,
+  Group<f_clang_Group>, Visibility<[ClangOption, CLOption, DXCOption]>,
+  HelpText<"Enable verification of generated machine code">, Flags<[NoXarchOption]>;
----------------
MaskRay wrote:

Remove NoXarchOption

If an option has the `NoXarchOption` flag, ClangDriver will emit an error if the option is used after `-Xarch_*` (originally for universal macOS binary, reused by offloading purposes `-Xarch_host`/etc).
The error checking only applies to a small set of options (e.g. `-o`) and is not very useful for most options, but `NoXarchOption` was improperly named `DriverOption` (commit aabb0b11a3c1d8a6bb859db80400cffdcc9b336f) and lured some contributors to add `NoXarchOption` to options that should not have the flag.



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


More information about the cfe-commits mailing list