From: Erich Keane Date: Mon, 26 Aug 2019 17:00:13 +0000 (+0000) Subject: Fix -dA flag, it is not a preprocessor flag. X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=bfbdd1595199ee75b90f4c24de501deb00e08983;p=clang Fix -dA flag, it is not a preprocessor flag. -dA was in the d_group, which is a preprocessor state dumping group. However -dA is a debug flag to cause a verbose asm. It was already implemented to do the same thing as -fverbose-asm, so make it just be an alias. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@369926 91177308-0d34-0410-b5e6-96231b3b80d8 --- diff --git a/docs/ClangCommandLineReference.rst b/docs/ClangCommandLineReference.rst index aa537826be..c26a6e5ecf 100644 --- a/docs/ClangCommandLineReference.rst +++ b/docs/ClangCommandLineReference.rst @@ -1147,8 +1147,6 @@ Flags allowing the state of the preprocessor to be dumped in various ways. .. option:: -d .. program:: clang -.. option:: -dA - .. option:: -dD Print macro definitions in -E mode in addition to normal output @@ -2012,7 +2010,7 @@ Use the given vector functions library Enable the loop vectorization passes -.. option:: -fverbose-asm, -fno-verbose-asm +.. option:: -fverbose-asm, -fno-verbose-asm, -dA .. option:: -fvisibility-inlines-hidden diff --git a/include/clang/Driver/Options.td b/include/clang/Driver/Options.td index baf7219aba..a50f881ee0 100644 --- a/include/clang/Driver/Options.td +++ b/include/clang/Driver/Options.td @@ -595,7 +595,6 @@ def fhip_dump_offload_linker_script : Flag<["-"], "fhip-dump-offload-linker-scri Group, Flags<[NoArgumentUnused, HelpHidden]>; def libomptarget_nvptx_path_EQ : Joined<["--"], "libomptarget-nvptx-path=">, Group, HelpText<"Path to libomptarget-nvptx libraries">; -def dA : Flag<["-"], "dA">, Group; def dD : Flag<["-"], "dD">, Group, Flags<[CC1Option]>, HelpText<"Print macro definitions in -E mode in addition to normal output">; def dI : Flag<["-"], "dI">, Group, Flags<[CC1Option]>, @@ -1808,6 +1807,7 @@ def fuse_init_array : Flag<["-"], "fuse-init-array">, Group, Flags<[CC1 HelpText<"Use .init_array instead of .ctors">; def fno_var_tracking : Flag<["-"], "fno-var-tracking">, Group; def fverbose_asm : Flag<["-"], "fverbose-asm">, Group; +def dA : Flag<["-"], "dA">, Alias; def fvisibility_EQ : Joined<["-"], "fvisibility=">, Group, HelpText<"Set the default symbol visibility for all global declarations">, Values<"hidden,default">; def fvisibility_inlines_hidden : Flag<["-"], "fvisibility-inlines-hidden">, Group, diff --git a/lib/Driver/ToolChains/Clang.cpp b/lib/Driver/ToolChains/Clang.cpp index 76d3f623b2..4f475b121f 100644 --- a/lib/Driver/ToolChains/Clang.cpp +++ b/lib/Driver/ToolChains/Clang.cpp @@ -4080,8 +4080,7 @@ void Clang::ConstructJob(Compilation &C, const JobAction &JA, // toolchains which have the integrated assembler on by default. bool IsIntegratedAssemblerDefault = TC.IsIntegratedAssemblerDefault(); if (Args.hasFlag(options::OPT_fverbose_asm, options::OPT_fno_verbose_asm, - IsIntegratedAssemblerDefault) || - Args.hasArg(options::OPT_dA)) + IsIntegratedAssemblerDefault)) CmdArgs.push_back("-masm-verbose"); if (!TC.useIntegratedAs())