clang 8.0.0

Tool.cpp
Go to the documentation of this file.
1 //===--- Tool.cpp - Compilation Tools -------------------------------------===//
2 //
3 // The LLVM Compiler Infrastructure
4 //
5 // This file is distributed under the University of Illinois Open Source
6 // License. See LICENSE.TXT for details.
7 //
8 //===----------------------------------------------------------------------===//
9
10 #include "clang/Driver/Tool.h"
11 #include "InputInfo.h"
12
13 using namespace clang::driver;
14
15 Tool::Tool(const char *_Name, const char *_ShortName, const ToolChain &TC,
16 ResponseFileSupport _ResponseSupport,
17 llvm::sys::WindowsEncodingMethod _ResponseEncoding,
18 const char *_ResponseFlag)
19 : Name(_Name), ShortName(_ShortName), TheToolChain(TC),
20 ResponseSupport(_ResponseSupport), ResponseEncoding(_ResponseEncoding),
21 ResponseFlag(_ResponseFlag) {}
22
23 Tool::~Tool() {
24 }
25
26 void Tool::ConstructJobMultipleOutputs(Compilation &C, const JobAction &JA,
27 const InputInfoList &Outputs,
28 const InputInfoList &Inputs,
29 const llvm::opt::ArgList &TCArgs,
30 const char *LinkingOutput) const {
31 assert(Outputs.size() == 1 && "Expected only one output by default!");
32 ConstructJob(C, JA, Outputs.front(), Inputs, TCArgs, LinkingOutput);
33 }
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:26
clang::driver::JobAction
Definition: Action.h:374
clang::driver::Tool::~Tool
virtual ~Tool()
Definition: Tool.cpp:23
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:15
llvm::SmallVector
Definition: LLVM.h:36
InputInfo.h
clang::driver::Compilation
Compilation - A set of tasks to perform for a single driver invocation.
Definition: Compilation.h:46
clang::driver
Definition: Action.h:32
clang::driver::Tool::ResponseFileSupport
ResponseFileSupport
Definition: Tool.h:39
clang::driver::ToolChain
ToolChain - Access to tools for a single platform.
Definition: ToolChain.h:89