diff options
author | Daniel Dunbar <daniel@zuster.org> | 2010-06-11 22:00:26 +0000 |
---|---|---|
committer | Daniel Dunbar <daniel@zuster.org> | 2010-06-11 22:00:26 +0000 |
commit | 279c1dbebf37cd128f3c73c70741a6b8c35ad025 (patch) | |
tree | d63cc4d0a2d13ad79bb6d2beb6534be7122d53aa /lib/Driver/ToolChains.cpp | |
parent | 3612bc80fabcdd337f6d1df06e69b38c2c5f5a32 (diff) |
Driver: Add an explicit argument translation phase to the driver itself. We are going to need this to handle things like -Xassembler, -Xpreprocessor, and -Xlinker which we might have to introspect.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@105842 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/Driver/ToolChains.cpp')
-rw-r--r-- | lib/Driver/ToolChains.cpp | 18 |
1 files changed, 4 insertions, 14 deletions
diff --git a/lib/Driver/ToolChains.cpp b/lib/Driver/ToolChains.cpp index 92c7d793f9..ba329e3855 100644 --- a/lib/Driver/ToolChains.cpp +++ b/lib/Driver/ToolChains.cpp @@ -388,9 +388,9 @@ void DarwinClang::AddLinkRuntimeLibArgs(const ArgList &Args, } } -DerivedArgList *Darwin::TranslateArgs(InputArgList &Args, +DerivedArgList *Darwin::TranslateArgs(const DerivedArgList &Args, const char *BoundArch) const { - DerivedArgList *DAL = new DerivedArgList(Args, false); + DerivedArgList *DAL = new DerivedArgList(Args.getBaseArgs()); const OptTable &Opts = getDriver().getOpts(); // FIXME: We really want to get out of the tool chain level argument @@ -478,7 +478,8 @@ DerivedArgList *Darwin::TranslateArgs(InputArgList &Args, } setTarget(iPhoneVersion, Major, Minor, Micro); - for (ArgList::iterator it = Args.begin(), ie = Args.end(); it != ie; ++it) { + for (ArgList::const_iterator it = Args.begin(), + ie = Args.end(); it != ie; ++it) { Arg *A = *it; if (A->getOption().matches(options::OPT_Xarch__)) { @@ -764,12 +765,6 @@ const char *Generic_GCC::GetForcedPicModel() const { return 0; } -DerivedArgList *Generic_GCC::TranslateArgs(InputArgList &Args, - const char *BoundArch) const { - return new DerivedArgList(Args, true); -} - - /// TCEToolChain - A tool chain using the llvm bitcode tools to perform /// all subcommands. See http://tce.cs.tut.fi for our peculiar target. /// Currently does not support anything else but compilation. @@ -824,11 +819,6 @@ Tool &TCEToolChain::SelectTool(const Compilation &C, return *T; } -DerivedArgList *TCEToolChain::TranslateArgs(InputArgList &Args, - const char *BoundArch) const { - return new DerivedArgList(Args, true); -} - /// OpenBSD - OpenBSD tool chain which can call as(1) and ld(1) directly. OpenBSD::OpenBSD(const HostInfo &Host, const llvm::Triple& Triple) |