diff options
author | Daniel Dunbar <daniel@zuster.org> | 2011-03-18 20:14:00 +0000 |
---|---|---|
committer | Daniel Dunbar <daniel@zuster.org> | 2011-03-18 20:14:00 +0000 |
commit | ac0659ae4124156915eddf70e78065df224d34c8 (patch) | |
tree | c025e2744730888340ed06566651441b2d94e5c2 /lib/Driver/Driver.cpp | |
parent | 4702309fb6718bcb52751722cf6ed28742707e58 (diff) |
Driver: Give SelectTool access to the action inputs.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@127902 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/Driver/Driver.cpp')
-rw-r--r-- | lib/Driver/Driver.cpp | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/lib/Driver/Driver.cpp b/lib/Driver/Driver.cpp index 41a0edc2ba..bfbf0a0be1 100644 --- a/lib/Driver/Driver.cpp +++ b/lib/Driver/Driver.cpp @@ -1088,7 +1088,8 @@ static const Tool &SelectToolForJob(Compilation &C, const ToolChain *TC, !C.getArgs().hasArg(options::OPT_save_temps) && isa<AssembleJobAction>(JA) && Inputs->size() == 1 && isa<CompileJobAction>(*Inputs->begin())) { - const Tool &Compiler = TC->SelectTool(C,cast<JobAction>(**Inputs->begin())); + const Tool &Compiler = TC->SelectTool( + C, cast<JobAction>(**Inputs->begin()), (*Inputs)[0]->getInputs()); if (Compiler.hasIntegratedAssembler()) { Inputs = &(*Inputs)[0]->getInputs(); ToolForJob = &Compiler; @@ -1097,7 +1098,7 @@ static const Tool &SelectToolForJob(Compilation &C, const ToolChain *TC, // Otherwise use the tool for the current job. if (!ToolForJob) - ToolForJob = &TC->SelectTool(C, *JA); + ToolForJob = &TC->SelectTool(C, *JA, *Inputs); // See if we should use an integrated preprocessor. We do so when we have // exactly one input, since this is the only use case we care about |