xref: /freebsd/contrib/llvm-project/clang/lib/Driver/Tool.cpp (revision fe6060f10f634930ff71b7c50291ddc610da2475)
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"
10*fe6060f1SDimitry 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)145ffd83dbSDimitry Andric Tool::Tool(const char *_Name, const char *_ShortName, const ToolChain &TC)
155ffd83dbSDimitry 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 }
28