[Toolchains] Cygwin toolchain inherits from Unix

There is currently a great deal of duplication across the
`GenericUnix` and `Windows` toolchains. The Android port will
add even more duplication.

To mitigate this, have `Windows` inherit from `GenericUnix`, and
have them share most of their implementation.

In addition, rename `Windows` to `Cygwin` (it would be pretty strange
to have a `Windows` toolchain inherit from something named `*Unix`).
This commit is contained in:
Brian Gesiak
2016-03-28 12:46:32 -04:00
parent 6cc8f68baa
commit d0747b0f47
3 changed files with 113 additions and 177 deletions

View File

@@ -2035,7 +2035,7 @@ const ToolChain *Driver::getToolChain(const ArgList &Args) const {
TC = new toolchains::GenericUnix(*this, Target);
break;
case llvm::Triple::Win32:
TC = new toolchains::Windows(*this, Target);
TC = new toolchains::Cygwin(*this, Target);
break;
default:
TC = nullptr;