From 1b15be7262aab8b8142f5676e2a171cad7c6cffd Mon Sep 17 00:00:00 2001 From: Jonas Hahnfeld Date: Thu, 22 Feb 2018 17:06:35 +0000 Subject: [PATCH] [docs] Improve help for OpenMP options, NFC. * Add HelpText for -fopenmp so that it appears in clang --help. * Hide -fno-openmp-simd, only list the positive option. * Hide -fopenmp-relocatable-target and -fopenmp-use-tls from clang --help and from ClangCommandLineReference. * Improve MetaVarName for -Xopenmp-target=<...>. Differential Revision: https://reviews.llvm.org/D42841 llvm-svn: 325806 --- clang/include/clang/Driver/Options.td | 27 +++++++++++++++------------ 1 file changed, 15 insertions(+), 12 deletions(-) diff --git a/clang/include/clang/Driver/Options.td b/clang/include/clang/Driver/Options.td index 50865f22f867..c8f2f339e5ee 100644 --- a/clang/include/clang/Driver/Options.td +++ b/clang/include/clang/Driver/Options.td @@ -466,7 +466,8 @@ def Xcuda_ptxas : Separate<["-"], "Xcuda-ptxas">, def Xopenmp_target : Separate<["-"], "Xopenmp-target">, HelpText<"Pass to the target offloading toolchain.">, MetaVarName<"">; def Xopenmp_target_EQ : JoinedAndSeparate<["-"], "Xopenmp-target=">, - HelpText<"Pass to the specified target offloading toolchain. The triple that identifies the toolchain must be provided after the equals sign.">, MetaVarName<"">; + HelpText<"Pass to the target offloading toolchain identified by .">, + MetaVarName<" ">; def z : Separate<["-"], "z">, Flags<[LinkerInput, RenderAsInput]>, HelpText<"Pass -z to the linker">, MetaVarName<"">, Group; @@ -1397,24 +1398,26 @@ def fno_objc_nonfragile_abi : Flag<["-"], "fno-objc-nonfragile-abi">, Group, Group; def fomit_frame_pointer : Flag<["-"], "fomit-frame-pointer">, Group; -def fopenmp : Flag<["-"], "fopenmp">, Group, Flags<[CC1Option, NoArgumentUnused]>; +def fopenmp : Flag<["-"], "fopenmp">, Group, Flags<[CC1Option, NoArgumentUnused]>, + HelpText<"Parse OpenMP pragmas and generate parallel code.">; def fno_openmp : Flag<["-"], "fno-openmp">, Group, Flags<[NoArgumentUnused]>; def fopenmp_version_EQ : Joined<["-"], "fopenmp-version=">, Group, Flags<[CC1Option, NoArgumentUnused]>; def fopenmp_EQ : Joined<["-"], "fopenmp=">, Group; -def fopenmp_use_tls : Flag<["-"], "fopenmp-use-tls">, Group, Flags<[NoArgumentUnused]>; -def fnoopenmp_use_tls : Flag<["-"], "fnoopenmp-use-tls">, Group, Flags<[CC1Option, NoArgumentUnused]>; +def fopenmp_use_tls : Flag<["-"], "fopenmp-use-tls">, Group, + Flags<[NoArgumentUnused, HelpHidden]>; +def fnoopenmp_use_tls : Flag<["-"], "fnoopenmp-use-tls">, Group, + Flags<[CC1Option, NoArgumentUnused, HelpHidden]>; def fopenmp_targets_EQ : CommaJoined<["-"], "fopenmp-targets=">, Flags<[DriverOption, CC1Option]>, HelpText<"Specify comma-separated list of triples OpenMP offloading targets to be supported">; -def fopenmp_dump_offload_linker_script : Flag<["-"], "fopenmp-dump-offload-linker-script">, Group, - Flags<[NoArgumentUnused]>; -def fopenmp_relocatable_target : Flag<["-"], "fopenmp-relocatable-target">, Group, Flags<[CC1Option, NoArgumentUnused]>, - HelpText<"OpenMP target code is compiled as relocatable using the -c flag. For OpenMP targets the code is relocatable by default.">; -def fnoopenmp_relocatable_target : Flag<["-"], "fnoopenmp-relocatable-target">, Group, Flags<[CC1Option, NoArgumentUnused]>, - HelpText<"Do not compile OpenMP target code as relocatable.">; +def fopenmp_dump_offload_linker_script : Flag<["-"], "fopenmp-dump-offload-linker-script">, + Group, Flags<[NoArgumentUnused, HelpHidden]>; +def fopenmp_relocatable_target : Flag<["-"], "fopenmp-relocatable-target">, + Group, Flags<[CC1Option, NoArgumentUnused, HelpHidden]>; +def fnoopenmp_relocatable_target : Flag<["-"], "fnoopenmp-relocatable-target">, + Group, Flags<[CC1Option, NoArgumentUnused, HelpHidden]>; def fopenmp_simd : Flag<["-"], "fopenmp-simd">, Group, Flags<[CC1Option, NoArgumentUnused]>, HelpText<"Emit OpenMP code only for SIMD-based constructs.">; -def fno_openmp_simd : Flag<["-"], "fno-openmp-simd">, Group, Flags<[CC1Option, NoArgumentUnused]>, - HelpText<"Disable OpenMP code for SIMD-based constructs.">; +def fno_openmp_simd : Flag<["-"], "fno-openmp-simd">, Group, Flags<[CC1Option, NoArgumentUnused]>; def fno_optimize_sibling_calls : Flag<["-"], "fno-optimize-sibling-calls">, Group; def foptimize_sibling_calls : Flag<["-"], "foptimize-sibling-calls">, Group; def force__cpusubtype__ALL : Flag<["-"], "force_cpusubtype_ALL">;