clang 10.0.0git

Tool.cpp
Go to the documentation of this file.
1 //===--- Tool.cpp - Compilation Tools -------------------------------------===//
2 //
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
6 //
7 //===----------------------------------------------------------------------===//
8
9 #include "clang/Driver/Tool.h"
10 #include "InputInfo.h"
11
12 using namespace clang::driver;
13
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) {}
21
22 Tool::~Tool() {
23 }
24
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 {
30 assert(Outputs.size() == 1 && "Expected only one output by default!");
31 ConstructJob(C, JA, Outputs.front(), Inputs, TCArgs, LinkingOutput);
32 }
Tool.h
clang::driver::Tool::ConstructJob
virtual void ConstructJob(Compilation &C, const JobAction &JA, const InputInfo &Output, const InputInfoList &Inputs, const llvm::opt::ArgList &TCArgs, const char *LinkingOutput) const =0
ConstructJob - Construct jobs to perform the action JA, writing to Output and with Inputs...
clang::driver::Tool::ConstructJobMultipleOutputs
virtual void ConstructJobMultipleOutputs(Compilation &C, const JobAction &JA, const InputInfoList &Outputs, const InputInfoList &Inputs, const llvm::opt::ArgList &TCArgs, const char *LinkingOutput) const
Construct jobs to perform the action JA, writing to the Outputs and with Inputs, and add the jobs to ...
Definition: Tool.cpp:25
clang::driver::JobAction
Definition: Action.h:375
clang::driver::Tool::~Tool
virtual ~Tool()
Definition: Tool.cpp:22
clang::driver::Tool::Tool
Tool(const char *Name, const char *ShortName, const ToolChain &TC, ResponseFileSupport ResponseSupport=RF_None, llvm::sys::WindowsEncodingMethod ResponseEncoding=llvm::sys::WEM_UTF8, const char *ResponseFlag="@")
Definition: Tool.cpp:14
llvm::SmallVector
Definition: LLVM.h:35
InputInfo.h
clang::driver::Compilation
Compilation - A set of tasks to perform for a single driver invocation.
Definition: Compilation.h:45
clang::driver
Definition: Action.h:31
clang::driver::Tool::ResponseFileSupport
ResponseFileSupport
Definition: Tool.h:38
clang::driver::ToolChain
ToolChain - Access to tools for a single platform.
Definition: ToolChain.h:88