Commit d18c471
committed
[clang][Darwin] Simplify deployment version assignment in the Driver (llvm#142013)
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.
(cherry picked from commit 752adc3)1 parent 720d1c7 commit d18c471
File tree
4 files changed
+222
-147
lines changed- clang
- include/clang/Basic
- lib/Driver/ToolChains
- test/Driver
4 files changed
+222
-147
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
205 | 205 | | |
206 | 206 | | |
207 | 207 | | |
| 208 | + | |
| 209 | + | |
| 210 | + | |
208 | 211 | | |
209 | 212 | | |
210 | 213 | | |
| |||
480 | 483 | | |
481 | 484 | | |
482 | 485 | | |
| 486 | + | |
| 487 | + | |
| 488 | + | |
483 | 489 | | |
484 | 490 | | |
485 | 491 | | |
| |||
0 commit comments