Skip to content

Commit e5699b8

Browse files
committed
[clang][driver] Rename DriverOption as NoXarchOption (NFC)
As discussed in [1], ClangFlags::DriverOption is currently only used to mark options that should not be forwarded to other tools via `-Xarch` options. This patch renames this flag accordingly and updates the corresponding driver diagnostic. A comment in ToolChain::TranslateXarchArgs is also updated to reflect the change. The original comment referred to isDriverOption(), which is no longer available. [1] http://lists.llvm.org/pipermail/cfe-dev/2020-October/066953.html Reviewed By: MaskRay Differential Revision: https://reviews.llvm.org/D89799
1 parent 4dfe014 commit e5699b8

File tree

5 files changed

+193
-192
lines changed

5 files changed

+193
-192
lines changed

clang/include/clang/Basic/DiagnosticDriverKinds.td

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -121,8 +121,6 @@ def err_drv_missing_argument : Error<
121121
"argument to '%0' is missing (expected %1 value%s1)">;
122122
def err_drv_invalid_Xarch_argument_with_args : Error<
123123
"invalid Xarch argument: '%0', options requiring arguments are unsupported">;
124-
def err_drv_invalid_Xarch_argument_isdriver : Error<
125-
"invalid Xarch argument: '%0', cannot change driver behavior inside Xarch argument">;
126124
def err_drv_Xopenmp_target_missing_triple : Error<
127125
"cannot deduce implicit triple value for -Xopenmp-target, specify triple using -Xopenmp-target=<triple>">;
128126
def err_drv_invalid_Xopenmp_target_with_args : Error<

clang/include/clang/Driver/Driver.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -314,7 +314,7 @@ class Driver {
314314

315315
const llvm::opt::OptTable &getOpts() const { return getDriverOptTable(); }
316316

317-
const DiagnosticsEngine &getDiags() const { return Diags; }
317+
DiagnosticsEngine &getDiags() const { return Diags; }
318318

319319
llvm::vfs::FileSystem &getVFS() const { return *VFS; }
320320

clang/include/clang/Driver/Options.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ namespace options {
2424
/// Flags specifically for clang options. Must not overlap with
2525
/// llvm::opt::DriverFlag.
2626
enum ClangFlags {
27-
DriverOption = (1 << 4),
27+
NoXarchOption = (1 << 4),
2828
LinkerInput = (1 << 5),
2929
NoArgumentUnused = (1 << 6),
3030
Unsupported = (1 << 7),

0 commit comments

Comments
 (0)