Skip to content

Commit 23ce683

Browse files
committed
[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.
1 parent a1f7b31 commit 23ce683

File tree

3 files changed

+0
-9
lines changed

3 files changed

+0
-9
lines changed

clang/include/clang/Basic/DiagnosticDriverKinds.td

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -128,8 +128,6 @@ def err_drv_invalid_stdlib_name : Error<
128128
def err_drv_invalid_output_with_multiple_archs : Error<
129129
"cannot use '%0' output with multiple -arch options">;
130130
def err_drv_no_input_files : Error<"no input files">;
131-
def err_drv_use_of_Z_option : Error<
132-
"unsupported use of internal gcc -Z option '%0'">;
133131
def err_drv_output_argument_with_multiple_files : Error<
134132
"cannot specify -o when generating multiple output files">;
135133
def err_drv_out_file_argument_with_multiple_sources : Error<

clang/include/clang/Driver/Options.td

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -844,8 +844,6 @@ def Xpreprocessor : Separate<["-"], "Xpreprocessor">, Group<Preprocessor_Group>,
844844
HelpText<"Pass <arg> to the preprocessor">, MetaVarName<"<arg>">;
845845
def X_Flag : Flag<["-"], "X">, Group<Link_Group>;
846846
def Z_Flag : Flag<["-"], "Z">, Group<Link_Group>;
847-
// FIXME: All we do with this is reject it. Remove.
848-
def Z_Joined : Joined<["-"], "Z">;
849847
def all__load : Flag<["-"], "all_load">;
850848
def allowable__client : Separate<["-"], "allowable_client">;
851849
def ansi : Flag<["-", "--"], "ansi">, Group<CompileOnly_Group>;

clang/lib/Driver/Driver.cpp

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -3869,11 +3869,6 @@ void Driver::BuildActions(Compilation &C, DerivedArgList &Args,
38693869
return;
38703870
}
38713871

3872-
// Reject -Z* at the top level, these options should never have been exposed
3873-
// by gcc.
3874-
if (Arg *A = Args.getLastArg(options::OPT_Z_Joined))
3875-
Diag(clang::diag::err_drv_use_of_Z_option) << A->getAsString(Args);
3876-
38773872
// Diagnose misuse of /Fo.
38783873
if (Arg *A = Args.getLastArg(options::OPT__SLASH_Fo)) {
38793874
StringRef V = A->getValue();

0 commit comments

Comments
 (0)