[clang] 0bb3aaf - [docs] Regenerate clang/docs/ClangCommandLineReference.rst

Fangrui Song via cfe-commits cfe-commits at lists.llvm.org
Mon Aug 1 19:31:29 PDT 2022


Author: Fangrui Song
Date: 2022-08-01T19:31:25-07:00
New Revision: 0bb3aafbd5d59fdd3720c4ba9b995863bc3d2f45

URL: https://github.com/llvm/llvm-project/commit/0bb3aafbd5d59fdd3720c4ba9b995863bc3d2f45
DIFF: https://github.com/llvm/llvm-project/commit/0bb3aafbd5d59fdd3720c4ba9b995863bc3d2f45.diff

LOG: [docs] Regenerate clang/docs/ClangCommandLineReference.rst

Also update -ftime-trace='s help to fix a recommonmark error.

Added: 
    

Modified: 
    clang/docs/ClangCommandLineReference.rst
    clang/include/clang/Driver/Options.td

Removed: 
    


################################################################################
diff  --git a/clang/docs/ClangCommandLineReference.rst b/clang/docs/ClangCommandLineReference.rst
index 6d1b6000484c..4d381374431a 100644
--- a/clang/docs/ClangCommandLineReference.rst
+++ b/clang/docs/ClangCommandLineReference.rst
@@ -893,6 +893,10 @@ Require member pointer base types to be complete if they would be significant un
 
 Put crash-report files in <dir>
 
+.. option:: -fcrash-diagnostics=<arg>, -fcrash-diagnostics (equivalent to -fcrash-diagnostics=compiler)
+
+Set level of crash diagnostic reporting, (option: off, compiler, all)
+
 .. option:: -fdeclspec, -fno-declspec
 
 Allow \_\_declspec as a keyword
@@ -1145,7 +1149,9 @@ Include path management
 
 Flags controlling how ``#include``\s are resolved to files.
 
-.. option:: -I<dir>, --include-directory <arg>, --include-directory=<arg>
+.. program:: clang3
+.. option:: -I<dir>, /I<dir>, -I<dir>, --include-directory <arg>, --include-directory=<arg>
+.. program:: clang
 
 Add directory to include search path. For C++ inputs, if
 there are multiple -I options, these directories are searched
@@ -2301,6 +2307,10 @@ Instrument only functions from files where names don't match all the regexes sep
 
 Instrument only functions from files where names match any regex separated by a semi-colon
 
+.. option:: -fprofile-function-groups=<N>
+
+Partition functions into N groups and select only functions in group i to be instrumented using -fprofile-selected-function-group
+
 .. option:: -fprofile-generate, -fno-profile-generate
 
 Generate instrumented code to collect execution counts into default.profraw (overridden by LLVM\_PROFILE\_FILE env var)
@@ -2333,10 +2343,6 @@ Use instrumentation data for profile-guided optimization
 
 Filename defining the list of functions/files to instrument
 
-.. option:: -fprofile-function-groups=<N>, -fprofile-selected-function-group=<i>
-
-Partition functions into <N> groups and select only functions in group <i> to be instrumented
-
 .. option:: -fprofile-remapping-file=<file>
 
 Use the remappings described in <file> to match the profile data against names in the program
@@ -2356,6 +2362,10 @@ Specifies that the sample profile is accurate. If the sample
 
 Enable sample-based profile guided optimizations
 
+.. option:: -fprofile-selected-function-group=<i>
+
+Partition functions into N groups using -fprofile-function-groups and select only functions in group i to be instrumented. The valid range is 0 to N-1 inclusive
+
 .. option:: -fprofile-update=<method>
 
 Set update method of profile counters. <method> must be 'atomic', 'prefer-atomic' or 'single'.
@@ -2528,6 +2538,10 @@ Emit full debug info for all types used by the program
 
 Enable optimizations based on the strict definition of an enum's value range
 
+.. option:: -fstrict-flex-arrays=<n>
+
+Enable optimizations based on the strict definition of flexible arrays. <n> must be '0', '1' or '2'.
+
 .. option:: -fstrict-float-cast-overflow, -fno-strict-float-cast-overflow
 
 Assume that overflowing float-to-int casts are undefined (default)
@@ -2587,6 +2601,12 @@ can be analyzed with chrome://tracing or `Speedscope App
 
 Minimum time granularity (in microseconds) traced by time profiler
 
+.. program:: clang1
+.. option:: -ftime-trace=<arg>
+.. program:: clang
+
+Similar to -ftime-trace. Specify the JSON file or a directory which will contain the JSON file
+
 .. option:: -ftls-model=<arg>
 
  <arg> must be 'global-dynamic', 'local-dynamic', 'initial-exec' or 'local-exec'.
@@ -2647,12 +2667,6 @@ Turn on loop unroller
 
 .. option:: -fuse-init-array, -fno-use-init-array
 
-.. option:: -fstrict-flex-arrays=<arg>, -fno-strict-flex-arrays
-
-Control which arrays are considered as flexible arrays members. <arg>
-can be 1 (array of size 0, 1 and undefined are considered) or 2 (array of size 0
-and undefined are considered).
-
 .. option:: -fuse-ld=<arg>
 
 .. option:: -fuse-line-directives, -fno-use-line-directives
@@ -3040,12 +3054,18 @@ Set Fuchsia API level
 .. option:: -mabi=<arg>
 
 .. program:: clang1
+.. option:: -mabi=quadword-atomics
+.. program:: clang
+
+Enable quadword atomics ABI on AIX (AIX PPC64 only). Uses lqarx/stqcx. instructions.
+
+.. program:: clang2
 .. option:: -mabi=vec-default
 .. program:: clang
 
 Enable the default Altivec ABI on AIX (AIX only). Uses only volatile vector registers.
 
-.. program:: clang2
+.. program:: clang3
 .. option:: -mabi=vec-extabi
 .. program:: clang
 
@@ -3141,6 +3161,10 @@ Insert calls to fentry at function entry (x86/SystemZ only)
 
 .. option:: -mfpu=<arg>
 
+.. option:: -mfunction-return=<arg>
+
+Replace returns with jumps to \`\`\_\_x86\_return\_thunk\`\` (x86 only, error otherwise). <arg> must be 'keep' or 'thunk-extern'.
+
 .. option:: -mgeneral-regs-only
 
 Generate code which only uses the general purpose registers (AArch64/x86 only)
@@ -3175,7 +3199,9 @@ Not emit the visibility attribute for asm in AIX OS or give all symbols 'unspeci
 
 (integrated-as) Emit an object file which can be used with an incremental linker
 
-.. option:: -miphoneos-version-min=<arg>, -mios-version-min=<arg>
+.. option:: -mios-version-min=<arg>, -miphoneos-version-min=<arg>
+
+Set iOS deployment target
 
 .. option:: -mkernel
 
@@ -3191,9 +3217,9 @@ Enable only control-flow mitigations for Load Value Injection (LVI)
 
 Enable all mitigations for Load Value Injection (LVI)
 
-.. option:: -mmacosx-version-min=<arg>, -mmacos-version-min=<arg>
+.. option:: -mmacos-version-min=<arg>, -mmacosx-version-min=<arg>
 
-Set Mac OS X deployment target
+Set macOS deployment target
 
 .. option:: -mmcu=<arg>
 
@@ -3335,7 +3361,7 @@ Specify bit size of immediate TLS offsets (AArch64 ELF only): 12 (for 4KB) \| 24
 .. option:: -mtune=<arg>
 .. program:: clang
 
-Only supported on X86, RISC-V and SystemZ. Otherwise accepted for compatibility with GCC.
+Only supported on AArch64, PowerPC, RISC-V, SystemZ, and X86
 
 .. option:: -mtvos-version-min=<arg>, -mappletvos-version-min=<arg>
 
@@ -4341,23 +4367,35 @@ undef all system defines
 
 Pass -z <arg> to the linker
 
+<clang-cl options>
+==================
+CL.EXE COMPATIBILITY OPTIONS
+
+<clang-cl compile-only options>
+~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+</M group>
+----------
+</volatile group>
+-----------------
+<clang-cl ignored options>
+~~~~~~~~~~~~~~~~~~~~~~~~~~
 <clang-dxc options>
 ===================
 dxc compatibility options
 
-.. program:: clang3
+.. program:: clang4
 .. option:: /T<profile>, -T<profile>
 .. program:: clang
 
 Set target profile. <profile> must be 'ps_6_0', ' ps_6_1', ' ps_6_2', ' ps_6_3', ' ps_6_4', ' ps_6_5', ' ps_6_6', ' ps_6_7', 'vs_6_0', ' vs_6_1', ' vs_6_2', ' vs_6_3', ' vs_6_4', ' vs_6_5', ' vs_6_6', ' vs_6_7', 'gs_6_0', ' gs_6_1', ' gs_6_2', ' gs_6_3', ' gs_6_4', ' gs_6_5', ' gs_6_6', ' gs_6_7', 'hs_6_0', ' hs_6_1', ' hs_6_2', ' hs_6_3', ' hs_6_4', ' hs_6_5', ' hs_6_6', ' hs_6_7', 'ds_6_0', ' ds_6_1', ' ds_6_2', ' ds_6_3', ' ds_6_4', ' ds_6_5', ' ds_6_6', ' ds_6_7', 'cs_6_0', ' cs_6_1', ' cs_6_2', ' cs_6_3', ' cs_6_4', ' cs_6_5', ' cs_6_6', ' cs_6_7', 'lib_6_3', ' lib_6_4', ' lib_6_5', ' lib_6_6', ' lib_6_7', ' lib_6_x', 'ms_6_5', ' ms_6_6', ' ms_6_7', 'as_6_5', ' as_6_6' or ' as_6_7'.
 
-.. program:: clang4
+.. program:: clang5
 .. option:: /emit-pristine-llvm, -emit-pristine-llvm, /fcgl, -fcgl
 .. program:: clang
 
 Emit pristine LLVM IR from the frontend by not running any LLVM passes at all.Same as -S + -emit-llvm + -disable-llvm-passes.
 
-.. program:: clang5
+.. program:: clang6
 .. option:: /hlsl-no-stdinc, -hlsl-no-stdinc
 .. program:: clang
 

diff  --git a/clang/include/clang/Driver/Options.td b/clang/include/clang/Driver/Options.td
index 3312f999a33f..bf73f12a5180 100644
--- a/clang/include/clang/Driver/Options.td
+++ b/clang/include/clang/Driver/Options.td
@@ -2876,12 +2876,7 @@ def ftime_trace_granularity_EQ : Joined<["-"], "ftime-trace-granularity=">, Grou
   Flags<[CC1Option, CoreOption]>,
   MarshallingInfoInt<FrontendOpts<"TimeTraceGranularity">, "500u">;
 def ftime_trace_EQ : Joined<["-"], "ftime-trace=">, Group<f_Group>,
-  HelpText<"Turn on time profiler. Generates JSON file based on output filename. "
-           "Specify the path which stores the tracing output file.">,
-  DocBrief<[{
-  Turn on time profiler. Generates JSON file based on output filename. Results
-  can be analyzed with chrome://tracing or `Speedscope App
-  <https://www.speedscope.app>`_ for flamegraph visualization.}]>,
+  HelpText<"Similar to -ftime-trace. Specify the JSON file or a directory which will contain the JSON file">,
   Flags<[CC1Option, CoreOption]>,
   MarshallingInfoString<FrontendOpts<"TimeTracePath">>;
 def fproc_stat_report : Joined<["-"], "fproc-stat-report">, Group<f_Group>,


        


More information about the cfe-commits mailing list