aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDaniel Dunbar <daniel@zuster.org>2010-08-02 05:44:01 +0000
committerDaniel Dunbar <daniel@zuster.org>2010-08-02 05:44:01 +0000
commitc2bda62f0ccbfc22651d9d986282c497afc9be1d (patch)
tree6ef0d5b5e4b71c659c79dbae771fc7fa76888c90
parent214afe96b4210ca36d99621dd930225e6bf5b9b3 (diff)
Driver/Darwin: Inline some constants.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@110026 91177308-0d34-0410-b5e6-96231b3b80d8
-rw-r--r--lib/Driver/HostInfo.cpp11
-rw-r--r--lib/Driver/ToolChains.cpp10
-rw-r--r--lib/Driver/ToolChains.h3
3 files changed, 7 insertions, 17 deletions
diff --git a/lib/Driver/HostInfo.cpp b/lib/Driver/HostInfo.cpp
index 60b9695482..4bd1e5a026 100644
--- a/lib/Driver/HostInfo.cpp
+++ b/lib/Driver/HostInfo.cpp
@@ -41,9 +41,6 @@ class DarwinHostInfo : public HostInfo {
/// Darwin version of host.
unsigned DarwinVersion[3];
- /// GCC version to use on this host.
- unsigned GCCVersion[3];
-
/// Cache of tool chains we have created.
mutable llvm::DenseMap<unsigned, ToolChain*> ToolChains;
@@ -68,11 +65,6 @@ DarwinHostInfo::DarwinHostInfo(const Driver &D, const llvm::Triple& Triple)
DarwinVersion[0], DarwinVersion[1],
DarwinVersion[2], HadExtra))
D.Diag(clang::diag::err_drv_invalid_darwin_version) << getOSName();
-
- // We can only call 4.2.1 for now.
- GCCVersion[0] = 4;
- GCCVersion[1] = 2;
- GCCVersion[2] = 1;
}
DarwinHostInfo::~DarwinHostInfo() {
@@ -139,8 +131,7 @@ ToolChain *DarwinHostInfo::CreateToolChain(const ArgList &Args,
TC = new toolchains::DarwinClang(*this, TCTriple, DarwinVersion);
} else if (Arch == llvm::Triple::x86 || Arch == llvm::Triple::x86_64) {
// We still use the legacy DarwinGCC toolchain on X86.
- TC = new toolchains::DarwinGCC(*this, TCTriple, DarwinVersion,
- GCCVersion);
+ TC = new toolchains::DarwinGCC(*this, TCTriple, DarwinVersion);
} else
TC = new toolchains::Darwin_Generic_GCC(*this, TCTriple);
}
diff --git a/lib/Driver/ToolChains.cpp b/lib/Driver/ToolChains.cpp
index 5a4ad6023c..1684fa9424 100644
--- a/lib/Driver/ToolChains.cpp
+++ b/lib/Driver/ToolChains.cpp
@@ -114,13 +114,13 @@ llvm::StringRef Darwin::getDarwinArchName(const ArgList &Args) const {
}
DarwinGCC::DarwinGCC(const HostInfo &Host, const llvm::Triple& Triple,
- const unsigned (&DarwinVersion)[3],
- const unsigned (&_GCCVersion)[3])
+ const unsigned (&DarwinVersion)[3])
: Darwin(Host, Triple, DarwinVersion)
{
- GCCVersion[0] = _GCCVersion[0];
- GCCVersion[1] = _GCCVersion[1];
- GCCVersion[2] = _GCCVersion[2];
+ // We can only work with 4.2.1 currently.
+ GCCVersion[0] = 4;
+ GCCVersion[1] = 2;
+ GCCVersion[2] = 1;
// Set up the tool chain paths to match gcc.
ToolChainDir = "i686-apple-darwin";
diff --git a/lib/Driver/ToolChains.h b/lib/Driver/ToolChains.h
index dfc18fe2b2..be96c97dbb 100644
--- a/lib/Driver/ToolChains.h
+++ b/lib/Driver/ToolChains.h
@@ -229,8 +229,7 @@ class LLVM_LIBRARY_VISIBILITY DarwinGCC : public Darwin {
public:
DarwinGCC(const HostInfo &Host, const llvm::Triple& Triple,
- const unsigned (&DarwinVersion)[3],
- const unsigned (&GCCVersion)[3]);
+ const unsigned (&DarwinVersion)[3]);
/// @name Darwin ToolChain Implementation
/// {