michaelmaitland updated this revision to Diff 500907. michaelmaitland added a comment.
Change `list` -> `help`. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D144914/new/ https://reviews.llvm.org/D144914 Files: clang/docs/CommandGuide/clang.rst clang/include/clang/Driver/Options.td clang/test/Driver/print-supported-cpus.c Index: clang/test/Driver/print-supported-cpus.c =================================================================== --- clang/test/Driver/print-supported-cpus.c +++ clang/test/Driver/print-supported-cpus.c @@ -13,6 +13,13 @@ // RUN: %clang --target=x86_64-unknown-linux-gnu -mtune=? -fuse-ld=dummy 2>&1 | \ // RUN: FileCheck %s --check-prefix=CHECK-X86 +// Test -mcpu=help and -mtune=help alises. +// RUN: %clang --target=x86_64-unknown-linux-gnu -mcpu=help 2>&1 | \ +// RUN: FileCheck %s --check-prefix=CHECK-X86 + +// RUN: %clang --target=x86_64-unknown-linux-gnu -mtune=help -fuse-ld=dummy 2>&1 | \ +// RUN: FileCheck %s --check-prefix=CHECK-X86 + // CHECK-NOT: warning: argument unused during compilation // CHECK-X86: Target: x86_64-unknown-linux-gnu // CHECK-X86: corei7 Index: clang/include/clang/Driver/Options.td =================================================================== --- clang/include/clang/Driver/Options.td +++ clang/include/clang/Driver/Options.td @@ -4347,6 +4347,8 @@ MarshallingInfoFlag<FrontendOpts<"PrintSupportedCPUs">>; def mcpu_EQ_QUESTION : Flag<["-"], "mcpu=?">, Alias<print_supported_cpus>; def mtune_EQ_QUESTION : Flag<["-"], "mtune=?">, Alias<print_supported_cpus>; +def mcpu_EQ_help : Flag<["-"], "mcpu=help">, Alias<print_supported_cpus>; +def mtune_EQ_help : Flag<["-"], "mtune=help">, Alias<print_supported_cpus>; def time : Flag<["-"], "time">, HelpText<"Time individual commands">; def traditional_cpp : Flag<["-", "--"], "traditional-cpp">, Flags<[CC1Option]>, Index: clang/docs/CommandGuide/clang.rst =================================================================== --- clang/docs/CommandGuide/clang.rst +++ clang/docs/CommandGuide/clang.rst @@ -373,6 +373,10 @@ Acts as an alias for :option:`--print-supported-cpus`. +.. option:: -mcpu=help, -mtune=help + + Acts as an alias for :option:`--print-supported-cpus`. + .. option:: -march=<cpu> Specify that Clang should generate code for a specific processor family
Index: clang/test/Driver/print-supported-cpus.c =================================================================== --- clang/test/Driver/print-supported-cpus.c +++ clang/test/Driver/print-supported-cpus.c @@ -13,6 +13,13 @@ // RUN: %clang --target=x86_64-unknown-linux-gnu -mtune=? -fuse-ld=dummy 2>&1 | \ // RUN: FileCheck %s --check-prefix=CHECK-X86 +// Test -mcpu=help and -mtune=help alises. +// RUN: %clang --target=x86_64-unknown-linux-gnu -mcpu=help 2>&1 | \ +// RUN: FileCheck %s --check-prefix=CHECK-X86 + +// RUN: %clang --target=x86_64-unknown-linux-gnu -mtune=help -fuse-ld=dummy 2>&1 | \ +// RUN: FileCheck %s --check-prefix=CHECK-X86 + // CHECK-NOT: warning: argument unused during compilation // CHECK-X86: Target: x86_64-unknown-linux-gnu // CHECK-X86: corei7 Index: clang/include/clang/Driver/Options.td =================================================================== --- clang/include/clang/Driver/Options.td +++ clang/include/clang/Driver/Options.td @@ -4347,6 +4347,8 @@ MarshallingInfoFlag<FrontendOpts<"PrintSupportedCPUs">>; def mcpu_EQ_QUESTION : Flag<["-"], "mcpu=?">, Alias<print_supported_cpus>; def mtune_EQ_QUESTION : Flag<["-"], "mtune=?">, Alias<print_supported_cpus>; +def mcpu_EQ_help : Flag<["-"], "mcpu=help">, Alias<print_supported_cpus>; +def mtune_EQ_help : Flag<["-"], "mtune=help">, Alias<print_supported_cpus>; def time : Flag<["-"], "time">, HelpText<"Time individual commands">; def traditional_cpp : Flag<["-", "--"], "traditional-cpp">, Flags<[CC1Option]>, Index: clang/docs/CommandGuide/clang.rst =================================================================== --- clang/docs/CommandGuide/clang.rst +++ clang/docs/CommandGuide/clang.rst @@ -373,6 +373,10 @@ Acts as an alias for :option:`--print-supported-cpus`. +.. option:: -mcpu=help, -mtune=help + + Acts as an alias for :option:`--print-supported-cpus`. + .. option:: -march=<cpu> Specify that Clang should generate code for a specific processor family
_______________________________________________ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits