[PATCH] D41035: [driver][darwin] Refactor the target selection code, NFC

Alex Lorenz via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Fri Dec 8 14:47:12 PST 2017


arphaman created this revision.

This patch refactors the target selection in Darwin's driver.
Firstly, the simulator variant of Darwin's platforms is removed in favor of a new environment field.
Secondly, the code that selects the platform and the version is split into 4 different functions instead of being all in one function.
This is an NFC patch, although it slightly improves the "invalid version number" diagnostic by displaying the environment variable instead of -m<os>-version-min if the OS version was derived from the environment.

This patch is a preparation for making `-target` the canonical way of specifying the platform. This will be done in a follow-up patch https://reviews.llvm.org/D40998.


Repository:
  rC Clang

https://reviews.llvm.org/D41035

Files:
  lib/Driver/ToolChains/Darwin.cpp
  lib/Driver/ToolChains/Darwin.h
  test/Driver/darwin-version.c

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D41035.126214.patch
Type: text/x-patch
Size: 33558 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/cfe-commits/attachments/20171208/e899f934/attachment-0001.bin>


More information about the cfe-commits mailing list