[clang] 23ce683 - [Driver] Remove Joined -Z and err_drv_use_of_Z_option
Fangrui Song via cfe-commits
cfe-commits at lists.llvm.org
Wed Aug 31 17:58:14 PDT 2022
Author: Fangrui Song
Date: 2022-08-31T17:58:04-07:00
New Revision: 23ce683eea358f0cf82ef51692bba6c86ffcf4a8
URL: https://github.com/llvm/llvm-project/commit/23ce683eea358f0cf82ef51692bba6c86ffcf4a8
DIFF: https://github.com/llvm/llvm-project/commit/23ce683eea358f0cf82ef51692bba6c86ffcf4a8.diff
LOG: [Driver] Remove Joined -Z and err_drv_use_of_Z_option
This takes a detour to report an error, but we can just remove Joined -Z
which is rejected by GCC.
Added:
Modified:
clang/include/clang/Basic/DiagnosticDriverKinds.td
clang/include/clang/Driver/Options.td
clang/lib/Driver/Driver.cpp
Removed:
################################################################################
diff --git a/clang/include/clang/Basic/DiagnosticDriverKinds.td b/clang/include/clang/Basic/DiagnosticDriverKinds.td
index 2f600d28fea0c..63be59082e7e0 100644
--- a/clang/include/clang/Basic/DiagnosticDriverKinds.td
+++ b/clang/include/clang/Basic/DiagnosticDriverKinds.td
@@ -128,8 +128,6 @@ def err_drv_invalid_stdlib_name : Error<
def err_drv_invalid_output_with_multiple_archs : Error<
"cannot use '%0' output with multiple -arch options">;
def err_drv_no_input_files : Error<"no input files">;
-def err_drv_use_of_Z_option : Error<
- "unsupported use of internal gcc -Z option '%0'">;
def err_drv_output_argument_with_multiple_files : Error<
"cannot specify -o when generating multiple output files">;
def err_drv_out_file_argument_with_multiple_sources : Error<
diff --git a/clang/include/clang/Driver/Options.td b/clang/include/clang/Driver/Options.td
index 0967fea650e41..606b1d588955a 100644
--- a/clang/include/clang/Driver/Options.td
+++ b/clang/include/clang/Driver/Options.td
@@ -844,8 +844,6 @@ def Xpreprocessor : Separate<["-"], "Xpreprocessor">, Group<Preprocessor_Group>,
HelpText<"Pass <arg> to the preprocessor">, MetaVarName<"<arg>">;
def X_Flag : Flag<["-"], "X">, Group<Link_Group>;
def Z_Flag : Flag<["-"], "Z">, Group<Link_Group>;
-// FIXME: All we do with this is reject it. Remove.
-def Z_Joined : Joined<["-"], "Z">;
def all__load : Flag<["-"], "all_load">;
def allowable__client : Separate<["-"], "allowable_client">;
def ansi : Flag<["-", "--"], "ansi">, Group<CompileOnly_Group>;
diff --git a/clang/lib/Driver/Driver.cpp b/clang/lib/Driver/Driver.cpp
index db6e4898ed551..ac8aa8ac8f707 100644
--- a/clang/lib/Driver/Driver.cpp
+++ b/clang/lib/Driver/Driver.cpp
@@ -3869,11 +3869,6 @@ void Driver::BuildActions(Compilation &C, DerivedArgList &Args,
return;
}
- // Reject -Z* at the top level, these options should never have been exposed
- // by gcc.
- if (Arg *A = Args.getLastArg(options::OPT_Z_Joined))
- Diag(clang::diag::err_drv_use_of_Z_option) << A->getAsString(Args);
-
// Diagnose misuse of /Fo.
if (Arg *A = Args.getLastArg(options::OPT__SLASH_Fo)) {
StringRef V = A->getValue();
More information about the cfe-commits
mailing list