Skip to content

Commit

Permalink
[Clang][Frontend] Change help text for --offload-host-device
Browse files Browse the repository at this point in the history
I believe the help text for the flag `--offload-host-device` is wrong. Currently, the help text says "Only compile for the offloading host." but the flag alias with `--cuda-compile-host-device` which
has the help text "Compile CUDA code for both host and device (default). Has no effect on non-CUDA compilations."

Fixes #64243

Reviewed By: jdoerfert

Differential Revision: https://reviews.llvm.org/D156641
  • Loading branch information
AntonRydahl committed Aug 1, 2023
1 parent edb5056 commit 2301e13
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion clang/include/clang/Driver/Options.td
Original file line number Diff line number Diff line change
Expand Up @@ -2875,7 +2875,7 @@ def offload_device_only : Flag<["--"], "offload-device-only">, Flags<[FlangOptio
def offload_host_only : Flag<["--"], "offload-host-only">, Flags<[FlangOption]>,
HelpText<"Only compile for the offloading host.">;
def offload_host_device : Flag<["--"], "offload-host-device">, Flags<[FlangOption]>,
HelpText<"Only compile for the offloading host.">;
HelpText<"Compile for both the offloading host and device (default).">;
def cuda_device_only : Flag<["--"], "cuda-device-only">, Alias<offload_device_only>,
HelpText<"Compile CUDA code for device only">;
def cuda_host_only : Flag<["--"], "cuda-host-only">, Alias<offload_host_only>,
Expand Down
2 changes: 1 addition & 1 deletion flang/test/Driver/driver-help-hidden.f90
Original file line number Diff line number Diff line change
Expand Up @@ -84,7 +84,7 @@
! CHECK-NEXT: -module-dir <dir> Put MODULE files in <dir>
! CHECK-NEXT: -nocpp Disable predefined and command line preprocessor macros
! CHECK-NEXT: --offload-device-only Only compile for the offloading device.
! CHECK-NEXT: --offload-host-device Only compile for the offloading host.
! CHECK-NEXT: --offload-host-device Compile for both the offloading host and device (default).
! CHECK-NEXT: --offload-host-only Only compile for the offloading host.
! CHECK-NEXT: -o <file> Write output to <file>
! CHECK-NEXT: -pedantic Warn on language extensions
Expand Down
2 changes: 1 addition & 1 deletion flang/test/Driver/driver-help.f90
Original file line number Diff line number Diff line change
Expand Up @@ -80,7 +80,7 @@
! HELP-NEXT: -module-dir <dir> Put MODULE files in <dir>
! HELP-NEXT: -nocpp Disable predefined and command line preprocessor macros
! HELP-NEXT: --offload-device-only Only compile for the offloading device.
! HELP-NEXT: --offload-host-device Only compile for the offloading host.
! HELP-NEXT: --offload-host-device Compile for both the offloading host and device (default).
! HELP-NEXT: --offload-host-only Only compile for the offloading host.
! HELP-NEXT: -o <file> Write output to <file>
! HELP-NEXT: -pedantic Warn on language extensions
Expand Down

0 comments on commit 2301e13

Please sign in to comment.