Skip to content

Commit 0bb3aaf

Browse files
committed
[docs] Regenerate clang/docs/ClangCommandLineReference.rst
Also update -ftime-trace='s help to fix a recommonmark error.
1 parent db6152a commit 0bb3aaf

File tree

2 files changed

+58
-25
lines changed

2 files changed

+58
-25
lines changed

clang/docs/ClangCommandLineReference.rst

Lines changed: 57 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -893,6 +893,10 @@ Require member pointer base types to be complete if they would be significant un
893893

894894
Put crash-report files in <dir>
895895

896+
.. option:: -fcrash-diagnostics=<arg>, -fcrash-diagnostics (equivalent to -fcrash-diagnostics=compiler)
897+
898+
Set level of crash diagnostic reporting, (option: off, compiler, all)
899+
896900
.. option:: -fdeclspec, -fno-declspec
897901

898902
Allow \_\_declspec as a keyword
@@ -1145,7 +1149,9 @@ Include path management
11451149

11461150
Flags controlling how ``#include``\s are resolved to files.
11471151

1148-
.. option:: -I<dir>, --include-directory <arg>, --include-directory=<arg>
1152+
.. program:: clang3
1153+
.. option:: -I<dir>, /I<dir>, -I<dir>, --include-directory <arg>, --include-directory=<arg>
1154+
.. program:: clang
11491155

11501156
Add directory to include search path. For C++ inputs, if
11511157
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
23012307

23022308
Instrument only functions from files where names match any regex separated by a semi-colon
23032309

2310+
.. option:: -fprofile-function-groups=<N>
2311+
2312+
Partition functions into N groups and select only functions in group i to be instrumented using -fprofile-selected-function-group
2313+
23042314
.. option:: -fprofile-generate, -fno-profile-generate
23052315

23062316
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
23332343

23342344
Filename defining the list of functions/files to instrument
23352345

2336-
.. option:: -fprofile-function-groups=<N>, -fprofile-selected-function-group=<i>
2337-
2338-
Partition functions into <N> groups and select only functions in group <i> to be instrumented
2339-
23402346
.. option:: -fprofile-remapping-file=<file>
23412347

23422348
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
23562362

23572363
Enable sample-based profile guided optimizations
23582364

2365+
.. option:: -fprofile-selected-function-group=<i>
2366+
2367+
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
2368+
23592369
.. option:: -fprofile-update=<method>
23602370

23612371
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
25282538

25292539
Enable optimizations based on the strict definition of an enum's value range
25302540

2541+
.. option:: -fstrict-flex-arrays=<n>
2542+
2543+
Enable optimizations based on the strict definition of flexible arrays. <n> must be '0', '1' or '2'.
2544+
25312545
.. option:: -fstrict-float-cast-overflow, -fno-strict-float-cast-overflow
25322546

25332547
Assume that overflowing float-to-int casts are undefined (default)
@@ -2587,6 +2601,12 @@ can be analyzed with chrome://tracing or `Speedscope App
25872601

25882602
Minimum time granularity (in microseconds) traced by time profiler
25892603

2604+
.. program:: clang1
2605+
.. option:: -ftime-trace=<arg>
2606+
.. program:: clang
2607+
2608+
Similar to -ftime-trace. Specify the JSON file or a directory which will contain the JSON file
2609+
25902610
.. option:: -ftls-model=<arg>
25912611

25922612
<arg> must be 'global-dynamic', 'local-dynamic', 'initial-exec' or 'local-exec'.
@@ -2647,12 +2667,6 @@ Turn on loop unroller
26472667

26482668
.. option:: -fuse-init-array, -fno-use-init-array
26492669

2650-
.. option:: -fstrict-flex-arrays=<arg>, -fno-strict-flex-arrays
2651-
2652-
Control which arrays are considered as flexible arrays members. <arg>
2653-
can be 1 (array of size 0, 1 and undefined are considered) or 2 (array of size 0
2654-
and undefined are considered).
2655-
26562670
.. option:: -fuse-ld=<arg>
26572671

26582672
.. option:: -fuse-line-directives, -fno-use-line-directives
@@ -3040,12 +3054,18 @@ Set Fuchsia API level
30403054
.. option:: -mabi=<arg>
30413055

30423056
.. program:: clang1
3057+
.. option:: -mabi=quadword-atomics
3058+
.. program:: clang
3059+
3060+
Enable quadword atomics ABI on AIX (AIX PPC64 only). Uses lqarx/stqcx. instructions.
3061+
3062+
.. program:: clang2
30433063
.. option:: -mabi=vec-default
30443064
.. program:: clang
30453065

30463066
Enable the default Altivec ABI on AIX (AIX only). Uses only volatile vector registers.
30473067

3048-
.. program:: clang2
3068+
.. program:: clang3
30493069
.. option:: -mabi=vec-extabi
30503070
.. program:: clang
30513071

@@ -3141,6 +3161,10 @@ Insert calls to fentry at function entry (x86/SystemZ only)
31413161

31423162
.. option:: -mfpu=<arg>
31433163

3164+
.. option:: -mfunction-return=<arg>
3165+
3166+
Replace returns with jumps to \`\`\_\_x86\_return\_thunk\`\` (x86 only, error otherwise). <arg> must be 'keep' or 'thunk-extern'.
3167+
31443168
.. option:: -mgeneral-regs-only
31453169

31463170
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
31753199

31763200
(integrated-as) Emit an object file which can be used with an incremental linker
31773201

3178-
.. option:: -miphoneos-version-min=<arg>, -mios-version-min=<arg>
3202+
.. option:: -mios-version-min=<arg>, -miphoneos-version-min=<arg>
3203+
3204+
Set iOS deployment target
31793205

31803206
.. option:: -mkernel
31813207

@@ -3191,9 +3217,9 @@ Enable only control-flow mitigations for Load Value Injection (LVI)
31913217

31923218
Enable all mitigations for Load Value Injection (LVI)
31933219

3194-
.. option:: -mmacosx-version-min=<arg>, -mmacos-version-min=<arg>
3220+
.. option:: -mmacos-version-min=<arg>, -mmacosx-version-min=<arg>
31953221

3196-
Set Mac OS X deployment target
3222+
Set macOS deployment target
31973223

31983224
.. option:: -mmcu=<arg>
31993225

@@ -3335,7 +3361,7 @@ Specify bit size of immediate TLS offsets (AArch64 ELF only): 12 (for 4KB) \| 24
33353361
.. option:: -mtune=<arg>
33363362
.. program:: clang
33373363

3338-
Only supported on X86, RISC-V and SystemZ. Otherwise accepted for compatibility with GCC.
3364+
Only supported on AArch64, PowerPC, RISC-V, SystemZ, and X86
33393365

33403366
.. option:: -mtvos-version-min=<arg>, -mappletvos-version-min=<arg>
33413367

@@ -4341,23 +4367,35 @@ undef all system defines
43414367

43424368
Pass -z <arg> to the linker
43434369

4370+
<clang-cl options>
4371+
==================
4372+
CL.EXE COMPATIBILITY OPTIONS
4373+
4374+
<clang-cl compile-only options>
4375+
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
4376+
</M group>
4377+
----------
4378+
</volatile group>
4379+
-----------------
4380+
<clang-cl ignored options>
4381+
~~~~~~~~~~~~~~~~~~~~~~~~~~
43444382
<clang-dxc options>
43454383
===================
43464384
dxc compatibility options
43474385

4348-
.. program:: clang3
4386+
.. program:: clang4
43494387
.. option:: /T<profile>, -T<profile>
43504388
.. program:: clang
43514389

43524390
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'.
43534391

4354-
.. program:: clang4
4392+
.. program:: clang5
43554393
.. option:: /emit-pristine-llvm, -emit-pristine-llvm, /fcgl, -fcgl
43564394
.. program:: clang
43574395

43584396
Emit pristine LLVM IR from the frontend by not running any LLVM passes at all.Same as -S + -emit-llvm + -disable-llvm-passes.
43594397

4360-
.. program:: clang5
4398+
.. program:: clang6
43614399
.. option:: /hlsl-no-stdinc, -hlsl-no-stdinc
43624400
.. program:: clang
43634401

clang/include/clang/Driver/Options.td

Lines changed: 1 addition & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -2876,12 +2876,7 @@ def ftime_trace_granularity_EQ : Joined<["-"], "ftime-trace-granularity=">, Grou
28762876
Flags<[CC1Option, CoreOption]>,
28772877
MarshallingInfoInt<FrontendOpts<"TimeTraceGranularity">, "500u">;
28782878
def ftime_trace_EQ : Joined<["-"], "ftime-trace=">, Group<f_Group>,
2879-
HelpText<"Turn on time profiler. Generates JSON file based on output filename. "
2880-
"Specify the path which stores the tracing output file.">,
2881-
DocBrief<[{
2882-
Turn on time profiler. Generates JSON file based on output filename. Results
2883-
can be analyzed with chrome://tracing or `Speedscope App
2884-
<https://www.speedscope.app>`_ for flamegraph visualization.}]>,
2879+
HelpText<"Similar to -ftime-trace. Specify the JSON file or a directory which will contain the JSON file">,
28852880
Flags<[CC1Option, CoreOption]>,
28862881
MarshallingInfoString<FrontendOpts<"TimeTracePath">>;
28872882
def fproc_stat_report : Joined<["-"], "fproc-stat-report">, Group<f_Group>,

0 commit comments

Comments
 (0)