xref: /netbsd-src/external/apache2/llvm/dist/clang/lib/Driver/Tool.cpp (revision e038c9c4676b0f19b1b7dd08a940c6ed64a6d5ae)
17330f729Sjoerg //===--- Tool.cpp - Compilation Tools -------------------------------------===//
27330f729Sjoerg //
37330f729Sjoerg // Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
47330f729Sjoerg // See https://llvm.org/LICENSE.txt for license information.
57330f729Sjoerg // SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
67330f729Sjoerg //
77330f729Sjoerg //===----------------------------------------------------------------------===//
87330f729Sjoerg 
97330f729Sjoerg #include "clang/Driver/Tool.h"
107330f729Sjoerg #include "InputInfo.h"
117330f729Sjoerg 
127330f729Sjoerg using namespace clang::driver;
137330f729Sjoerg 
Tool(const char * _Name,const char * _ShortName,const ToolChain & TC)14*e038c9c4Sjoerg Tool::Tool(const char *_Name, const char *_ShortName, const ToolChain &TC)
15*e038c9c4Sjoerg     : Name(_Name), ShortName(_ShortName), TheToolChain(TC) {}
167330f729Sjoerg 
~Tool()177330f729Sjoerg Tool::~Tool() {
187330f729Sjoerg }
197330f729Sjoerg 
ConstructJobMultipleOutputs(Compilation & C,const JobAction & JA,const InputInfoList & Outputs,const InputInfoList & Inputs,const llvm::opt::ArgList & TCArgs,const char * LinkingOutput) const207330f729Sjoerg void Tool::ConstructJobMultipleOutputs(Compilation &C, const JobAction &JA,
217330f729Sjoerg                                        const InputInfoList &Outputs,
227330f729Sjoerg                                        const InputInfoList &Inputs,
237330f729Sjoerg                                        const llvm::opt::ArgList &TCArgs,
247330f729Sjoerg                                        const char *LinkingOutput) const {
257330f729Sjoerg   assert(Outputs.size() == 1 && "Expected only one output by default!");
267330f729Sjoerg   ConstructJob(C, JA, Outputs.front(), Inputs, TCArgs, LinkingOutput);
277330f729Sjoerg }
28