]> granicus.if.org Git - clang/commit
[Driver] Refactor distro detection & classification as a separate API
authorMichal Gorny <mgorny@gentoo.org>
Mon, 28 Nov 2016 21:11:14 +0000 (21:11 +0000)
committerMichal Gorny <mgorny@gentoo.org>
Mon, 28 Nov 2016 21:11:14 +0000 (21:11 +0000)
commit7f0a87981e644ff867480219ce4166c38057e0be
tree156378c620742d52142fcd40e6e1152e336e80b0
parentdc3ec65843d47231a4d2cf1c40ef7b00a536b9c8
[Driver] Refactor distro detection & classification as a separate API

Refactor the Distro enum along with helper functions into a full-fledged
Distro class, inspired by llvm::Triple, and make it a public API.
The new class wraps the enum with necessary comparison operators, adding
the convenience Is*() methods and a constructor performing
the detection. The public API is needed to run the unit tests (D25869).

Differential Revision: https://reviews.llvm.org/D25949

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@288060 91177308-0d34-0410-b5e6-96231b3b80d8
include/clang/Driver/Distro.h [new file with mode: 0644]
lib/Driver/CMakeLists.txt
lib/Driver/Distro.cpp [new file with mode: 0644]
lib/Driver/ToolChains.cpp