diff options
author | Rafael Espindola <rafael.espindola@gmail.com> | 2013-03-18 18:10:27 +0000 |
---|---|---|
committer | Rafael Espindola <rafael.espindola@gmail.com> | 2013-03-18 18:10:27 +0000 |
commit | 84b588b25ce4bcbd0a9bd0c1fdea72a11d4fa1e6 (patch) | |
tree | db7a35702d065be1b7a2d88461c251e568ad6896 /clang/lib/Driver/ToolChains.cpp | |
parent | 878d2da6ab3121cdde7852f8b347eb42718272cc (diff) | |
download | bcm5719-llvm-84b588b25ce4bcbd0a9bd0c1fdea72a11d4fa1e6.tar.gz bcm5719-llvm-84b588b25ce4bcbd0a9bd0c1fdea72a11d4fa1e6.zip |
Pass an ArgList to every toolchain constructor. Remove the useIntegratedAs
argument.
llvm-svn: 177301
Diffstat (limited to 'clang/lib/Driver/ToolChains.cpp')
-rw-r--r-- | clang/lib/Driver/ToolChains.cpp | 28 |
1 files changed, 15 insertions, 13 deletions
diff --git a/clang/lib/Driver/ToolChains.cpp b/clang/lib/Driver/ToolChains.cpp index 5b8f5c98065..d9ecb2ed200 100644 --- a/clang/lib/Driver/ToolChains.cpp +++ b/clang/lib/Driver/ToolChains.cpp @@ -42,8 +42,8 @@ using namespace clang; /// Darwin - Darwin tool chain for i386 and x86_64. -Darwin::Darwin(const Driver &D, const llvm::Triple& Triple) - : ToolChain(D, Triple), TargetInitialized(false) +Darwin::Darwin(const Driver &D, const llvm::Triple& Triple, const ArgList &Args) + : ToolChain(D, Triple, Args), TargetInitialized(false) { // Compute the initial Darwin version from the triple unsigned Major, Minor, Micro; @@ -197,7 +197,7 @@ Tool &Darwin::SelectTool(const Compilation &C, const JobAction &JA) const { case Action::CompileJobClass: T = new tools::Clang(*this); break; case Action::AssembleJobClass: { - if (useIntegratedAs(C.getArgs())) + if (useIntegratedAs()) T = new tools::ClangAs(*this); else T = new tools::darwin::Assemble(*this); @@ -218,8 +218,9 @@ Tool &Darwin::SelectTool(const Compilation &C, const JobAction &JA) const { } -DarwinClang::DarwinClang(const Driver &D, const llvm::Triple& Triple) - : Darwin(D, Triple) +DarwinClang::DarwinClang(const Driver &D, const llvm::Triple& Triple, + const ArgList &Args) + : Darwin(D, Triple, Args) { getProgramPaths().push_back(getDriver().getInstalledDir()); if (getDriver().getInstalledDir() != getDriver().Dir) @@ -1368,7 +1369,7 @@ void Generic_GCC::GCCInstallationDetector::ScanLibDirForGCCTriple( Generic_GCC::Generic_GCC(const Driver &D, const llvm::Triple& Triple, const ArgList &Args) - : ToolChain(D, Triple), GCCInstallation(getDriver(), Triple, Args) { + : ToolChain(D, Triple, Args), GCCInstallation(getDriver(), Triple, Args) { getProgramPaths().push_back(getDriver().getInstalledDir()); if (getDriver().getInstalledDir() != getDriver().Dir) getProgramPaths().push_back(getDriver().Dir); @@ -1668,8 +1669,9 @@ StringRef Hexagon_TC::GetTargetCPU(const ArgList &Args) /// all subcommands. See http://tce.cs.tut.fi for our peculiar target. /// Currently does not support anything else but compilation. -TCEToolChain::TCEToolChain(const Driver &D, const llvm::Triple& Triple) - : ToolChain(D, Triple) { +TCEToolChain::TCEToolChain(const Driver &D, const llvm::Triple& Triple, + const ArgList &Args) + : ToolChain(D, Triple, Args) { // Path mangling to find libexec std::string Path(getDriver().Dir); @@ -1733,7 +1735,7 @@ Tool &OpenBSD::SelectTool(const Compilation &C, const JobAction &JA) const { if (!T) { switch (Key) { case Action::AssembleJobClass: { - if (useIntegratedAs(C.getArgs())) + if (useIntegratedAs()) T = new tools::ClangAs(*this); else T = new tools::openbsd::Assemble(*this); @@ -1768,7 +1770,7 @@ Tool &Bitrig::SelectTool(const Compilation &C, const JobAction &JA) const { if (!T) { switch (Key) { case Action::AssembleJobClass: { - if (useIntegratedAs(C.getArgs())) + if (useIntegratedAs()) T = new tools::ClangAs(*this); else T = new tools::bitrig::Assemble(*this); @@ -1855,7 +1857,7 @@ Tool &FreeBSD::SelectTool(const Compilation &C, const JobAction &JA) const { if (!T) { switch (Key) { case Action::AssembleJobClass: - if (useIntegratedAs(C.getArgs())) + if (useIntegratedAs()) T = new tools::ClangAs(*this); else T = new tools::freebsd::Assemble(*this); @@ -1912,7 +1914,7 @@ Tool &NetBSD::SelectTool(const Compilation &C, const JobAction &JA) const { if (!T) { switch (Key) { case Action::AssembleJobClass: - if (useIntegratedAs(C.getArgs())) + if (useIntegratedAs()) T = new tools::ClangAs(*this); else T = new tools::netbsd::Assemble(*this); @@ -2411,7 +2413,7 @@ Tool &Linux::SelectTool(const Compilation &C, const JobAction &JA) const { if (!T) { switch (Key) { case Action::AssembleJobClass: - if (useIntegratedAs(C.getArgs())) + if (useIntegratedAs()) T = new tools::ClangAs(*this); else T = new tools::linuxtools::Assemble(*this); |