Skip to content

Commit a12e45e

Browse files
committed
[clang][Darwin] Simply deployment version assignment in the Driver
To be able to handle all of the ways the platform & deployment version can be represented in command line flags, the Darwin toolchain holds a type DarwinPlatform to help represent them. This patch simplifies the logic by: reducing the amount of work done between string & version tuples conversions renaming variables to reduce confusion about what target triple information is being manipulated. allowing implicit transformation of macOS10.16 -> 11, there are other places in the compiler where this happens, and it was a bit confusing that the driver didn't do that for the cc1 call. This is not a major refactor, but more simple & common tweaks across the file, in hopes to make it more readable.
1 parent 540cf25 commit a12e45e

File tree

4 files changed

+173
-132
lines changed

4 files changed

+173
-132
lines changed

clang/include/clang/Basic/DiagnosticDriverKinds.td

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -206,6 +206,7 @@ def err_drv_cannot_open_randomize_layout_seed_file : Error<
206206
"cannot read randomize layout seed file '%0'">;
207207
def err_drv_invalid_version_number : Error<
208208
"invalid version number in '%0'">;
209+
def err_drv_missing_version_number : Error<"missing version number in '%0'">;
209210
def err_drv_kcfi_arity_unsupported_target : Error<
210211
"target '%0' is unsupported by -fsanitize-kcfi-arity">;
211212
def err_drv_no_linker_llvm_support : Error<
@@ -478,6 +479,9 @@ def warn_ignoring_ftabstop_value : Warning<
478479
def warn_drv_overriding_option : Warning<
479480
"overriding '%0' option with '%1'">,
480481
InGroup<DiagGroup<"overriding-option">>;
482+
def warn_drv_overriding_deployment_version
483+
: Warning<"overriding deployment version from '%0' to '%1'">,
484+
InGroup<DiagGroup<"overriding-deployment-version">>;
481485
def warn_drv_treating_input_as_cxx : Warning<
482486
"treating '%0' input as '%1' when in C++ mode, this behavior is deprecated">,
483487
InGroup<Deprecated>;

0 commit comments

Comments
 (0)