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 | 1e1c3ca51ce9844cbc54e0458aef86f3c3f7631d (patch) | |
| tree | 45856e8322b2a3712d1c9d075a30c3d03ab555fe /clang/lib/Driver/Driver.cpp | |
| parent | 5b778b2e607d18988528dd4a1c9cca59fe368283 (diff) | |
| download | bcm5719-llvm-1e1c3ca51ce9844cbc54e0458aef86f3c3f7631d.tar.gz bcm5719-llvm-1e1c3ca51ce9844cbc54e0458aef86f3c3f7631d.zip | |
Driver: Give SelectTool access to the action inputs.
llvm-svn: 127902
Diffstat (limited to 'clang/lib/Driver/Driver.cpp')
| -rw-r--r-- | clang/lib/Driver/Driver.cpp | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/clang/lib/Driver/Driver.cpp b/clang/lib/Driver/Driver.cpp index 41a0edc2ba3..bfbf0a0be12 100644 --- a/clang/lib/Driver/Driver.cpp +++ b/clang/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 |

