10b57cec5SDimitry Andric //===--- Tool.cpp - Compilation Tools -------------------------------------===//
20b57cec5SDimitry Andric //
30b57cec5SDimitry Andric // Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
40b57cec5SDimitry Andric // See https://llvm.org/LICENSE.txt for license information.
50b57cec5SDimitry Andric // SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
60b57cec5SDimitry Andric //
70b57cec5SDimitry Andric //===----------------------------------------------------------------------===//
80b57cec5SDimitry Andric 
90b57cec5SDimitry Andric #include "clang/Driver/Tool.h"
100b57cec5SDimitry Andric #include "clang/Driver/InputInfo.h"
110b57cec5SDimitry Andric 
120b57cec5SDimitry Andric using namespace clang::driver;
130b57cec5SDimitry Andric 
Tool(const char * _Name,const char * _ShortName,const ToolChain & TC)140b57cec5SDimitry Andric Tool::Tool(const char *_Name, const char *_ShortName, const ToolChain &TC)
150b57cec5SDimitry Andric     : Name(_Name), ShortName(_ShortName), TheToolChain(TC) {}
160b57cec5SDimitry Andric 
~Tool()170b57cec5SDimitry Andric Tool::~Tool() {
180b57cec5SDimitry Andric }
190b57cec5SDimitry Andric 
ConstructJobMultipleOutputs(Compilation & C,const JobAction & JA,const InputInfoList & Outputs,const InputInfoList & Inputs,const llvm::opt::ArgList & TCArgs,const char * LinkingOutput) const200b57cec5SDimitry Andric void Tool::ConstructJobMultipleOutputs(Compilation &C, const JobAction &JA,
210b57cec5SDimitry Andric                                        const InputInfoList &Outputs,
220b57cec5SDimitry Andric                                        const InputInfoList &Inputs,
230b57cec5SDimitry Andric                                        const llvm::opt::ArgList &TCArgs,
240b57cec5SDimitry Andric                                        const char *LinkingOutput) const {
250b57cec5SDimitry Andric   assert(Outputs.size() == 1 && "Expected only one output by default!");
260b57cec5SDimitry Andric   ConstructJob(C, JA, Outputs.front(), Inputs, TCArgs, LinkingOutput);
270b57cec5SDimitry Andric }
280b57cec5SDimitry Andric