| Nick Lewycky | 6da9077 | 2010-12-31 17:31:54 +0000 | [diff] [blame] | 1 | //===--- Tool.cpp - Compilation Tools -------------------------------------===// |
| Daniel Dunbar | 9e2136d | 2009-03-16 05:25:36 +0000 | [diff] [blame] | 2 | // |
| Chandler Carruth | 2946cd7 | 2019-01-19 08:50:56 +0000 | [diff] [blame] | 3 | // Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. |
| 4 | // See https://llvm.org/LICENSE.txt for license information. |
| 5 | // SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception |
| Daniel Dunbar | 9e2136d | 2009-03-16 05:25:36 +0000 | [diff] [blame] | 6 | // |
| 7 | //===----------------------------------------------------------------------===// |
| 8 | |
| 9 | #include "clang/Driver/Tool.h" |
| Samuel Antao | 3b7e38b | 2016-10-27 18:14:55 +0000 | [diff] [blame] | 10 | #include "InputInfo.h" |
| Daniel Dunbar | 9e2136d | 2009-03-16 05:25:36 +0000 | [diff] [blame] | 11 | |
| 12 | using namespace clang::driver; |
| 13 | |
| Reid Kleckner | 0290c9c | 2014-09-15 17:45:39 +0000 | [diff] [blame] | 14 | Tool::Tool(const char *_Name, const char *_ShortName, const ToolChain &TC, |
| 15 | ResponseFileSupport _ResponseSupport, |
| 16 | llvm::sys::WindowsEncodingMethod _ResponseEncoding, |
| 17 | const char *_ResponseFlag) |
| 18 | : Name(_Name), ShortName(_ShortName), TheToolChain(TC), |
| 19 | ResponseSupport(_ResponseSupport), ResponseEncoding(_ResponseEncoding), |
| 20 | ResponseFlag(_ResponseFlag) {} |
| Daniel Dunbar | 04cb029 | 2009-03-17 22:07:31 +0000 | [diff] [blame] | 21 | |
| Angel Garcia Gomez | 637d1e6 | 2015-10-20 13:23:58 +0000 | [diff] [blame] | 22 | Tool::~Tool() { |
| 23 | } |
| Samuel Antao | 3b7e38b | 2016-10-27 18:14:55 +0000 | [diff] [blame] | 24 | |
| Samuel Antao | 7108bf3 | 2016-11-03 15:41:50 +0000 | [diff] [blame] | 25 | void Tool::ConstructJobMultipleOutputs(Compilation &C, const JobAction &JA, |
| 26 | const InputInfoList &Outputs, |
| 27 | const InputInfoList &Inputs, |
| 28 | const llvm::opt::ArgList &TCArgs, |
| 29 | const char *LinkingOutput) const { |
| Samuel Antao | 3b7e38b | 2016-10-27 18:14:55 +0000 | [diff] [blame] | 30 | assert(Outputs.size() == 1 && "Expected only one output by default!"); |
| 31 | ConstructJob(C, JA, Outputs.front(), Inputs, TCArgs, LinkingOutput); |
| Samuel Antao | 7108bf3 | 2016-11-03 15:41:50 +0000 | [diff] [blame] | 32 | } |