Driver/Darwin: Change where Darwin computes the host version, to normalize tool
chain construction.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@110028 91177308-0d34-0410-b5e6-96231b3b80d8
diff --git a/lib/Driver/ToolChains.h b/lib/Driver/ToolChains.h
index be96c97..700d5fd 100644
--- a/lib/Driver/ToolChains.h
+++ b/lib/Driver/ToolChains.h
@@ -42,6 +42,11 @@
/// Darwin - The base Darwin tool chain.
class LLVM_LIBRARY_VISIBILITY Darwin : public ToolChain {
+public:
+ /// The host version.
+ unsigned DarwinVersion[3];
+
+private:
mutable llvm::DenseMap<unsigned, Tool*> Tools;
/// Whether the information on the target has been initialized.
@@ -65,8 +70,7 @@
void AddDeploymentTarget(DerivedArgList &Args) const;
public:
- Darwin(const HostInfo &Host, const llvm::Triple& Triple,
- const unsigned (&DarwinVersion)[3]);
+ Darwin(const HostInfo &Host, const llvm::Triple& Triple);
~Darwin();
/// @name Darwin Specific Toolchain API
@@ -204,8 +208,7 @@
/// DarwinClang - The Darwin toolchain used by Clang.
class LLVM_LIBRARY_VISIBILITY DarwinClang : public Darwin {
public:
- DarwinClang(const HostInfo &Host, const llvm::Triple& Triple,
- const unsigned (&DarwinVersion)[3]);
+ DarwinClang(const HostInfo &Host, const llvm::Triple& Triple);
/// @name Darwin ToolChain Implementation
/// {
@@ -228,8 +231,7 @@
std::string ToolChainDir;
public:
- DarwinGCC(const HostInfo &Host, const llvm::Triple& Triple,
- const unsigned (&DarwinVersion)[3]);
+ DarwinGCC(const HostInfo &Host, const llvm::Triple& Triple);
/// @name Darwin ToolChain Implementation
/// {