diff options
author | Daniel Dunbar <daniel@zuster.org> | 2009-05-22 02:53:45 +0000 |
---|---|---|
committer | Daniel Dunbar <daniel@zuster.org> | 2009-05-22 02:53:45 +0000 |
commit | cb8ab23f7c800b041aeb6fc38c341d1aa0da86bf (patch) | |
tree | 45914778234d72e4e73e18a1461257b4c918d401 /lib/Driver/ToolChains.cpp | |
parent | 7cfe31a713d8fcfc2a1328e8fbd8efdeb0aec51b (diff) |
(llvm up) Use llvm::Triple for storing target triples.
- This commit has some messy stuff in it to extend string lifetimes, but that
will go away once we switch to using the enum'd Triple interfaces.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@72243 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/Driver/ToolChains.cpp')
-rw-r--r-- | lib/Driver/ToolChains.cpp | 20 |
1 files changed, 8 insertions, 12 deletions
diff --git a/lib/Driver/ToolChains.cpp b/lib/Driver/ToolChains.cpp index 73105355f8..718f6280b3 100644 --- a/lib/Driver/ToolChains.cpp +++ b/lib/Driver/ToolChains.cpp @@ -27,11 +27,10 @@ using namespace clang::driver::toolchains; /// Darwin_X86 - Darwin tool chain for i386 and x86_64. -Darwin_X86::Darwin_X86(const HostInfo &Host, const char *Arch, - const char *Platform, const char *OS, +Darwin_X86::Darwin_X86(const HostInfo &Host, const llvm::Triple& Triple, const unsigned (&_DarwinVersion)[3], const unsigned (&_GCCVersion)[3]) - : ToolChain(Host, Arch, Platform, OS) { + : ToolChain(Host, Triple) { DarwinVersion[0] = _DarwinVersion[0]; DarwinVersion[1] = _DarwinVersion[1]; DarwinVersion[2] = _DarwinVersion[2]; @@ -309,9 +308,8 @@ const char *Darwin_X86::GetForcedPicModel() const { /// all subcommands; this relies on gcc translating the majority of /// command line options. -Generic_GCC::Generic_GCC(const HostInfo &Host, const char *Arch, - const char *Platform, const char *OS) - : ToolChain(Host, Arch, Platform, OS) +Generic_GCC::Generic_GCC(const HostInfo &Host, const llvm::Triple& Triple) + : ToolChain(Host, Triple) { std::string Path(getHost().getDriver().Dir); Path += "/../libexec"; @@ -388,9 +386,8 @@ DerivedArgList *Generic_GCC::TranslateArgs(InputArgList &Args) const { /// FreeBSD - FreeBSD tool chain which can call as(1) and ld(1) directly. -FreeBSD::FreeBSD(const HostInfo &Host, const char *Arch, - const char *Platform, const char *OS, bool Lib32) - : Generic_GCC(Host, Arch, Platform, OS) { +FreeBSD::FreeBSD(const HostInfo &Host, const llvm::Triple& Triple, bool Lib32) + : Generic_GCC(Host, Triple) { if (Lib32) { getFilePaths().push_back(getHost().getDriver().Dir + "/../lib32"); getFilePaths().push_back("/usr/lib32"); @@ -424,9 +421,8 @@ Tool &FreeBSD::SelectTool(const Compilation &C, const JobAction &JA) const { /// DragonFly - DragonFly tool chain which can call as(1) and ld(1) directly. -DragonFly::DragonFly(const HostInfo &Host, const char *Arch, - const char *Platform, const char *OS) - : Generic_GCC(Host, Arch, Platform, OS) { +DragonFly::DragonFly(const HostInfo &Host, const llvm::Triple& Triple) + : Generic_GCC(Host, Triple) { // Path mangling to find libexec std::string Path(getHost().getDriver().Dir); |