clang  10.0.0svn
InterfaceStubs.cpp
Go to the documentation of this file.
1 //===--- InterfaceStubs.cpp - Base InterfaceStubs Implementations C++ ---===//
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 "InterfaceStubs.h"
10 #include "CommonArgs.h"
12 
13 namespace clang {
14 namespace driver {
15 namespace tools {
16 namespace ifstool {
18  const InputInfo &Output, const InputInfoList &Inputs,
19  const llvm::opt::ArgList &Args,
20  const char *LinkingOutput) const {
22  llvm::opt::ArgStringList CmdArgs;
23  CmdArgs.push_back("-action");
24  CmdArgs.push_back(Args.getLastArg(options::OPT_emit_merged_ifs)
25  ? "write-ifs"
26  : "write-bin");
27  CmdArgs.push_back("-o");
28  CmdArgs.push_back(Output.getFilename());
29  for (const auto &Input : Inputs)
30  CmdArgs.push_back(Input.getFilename());
31  C.addCommand(std::make_unique<Command>(JA, *this, Args.MakeArgString(Merger),
32  CmdArgs, Inputs));
33 }
34 } // namespace ifstool
35 } // namespace tools
36 } // namespace driver
37 } // namespace clang
void ConstructJob(Compilation &C, const JobAction &JA, const InputInfo &Output, const InputInfoList &Inputs, const llvm::opt::ArgList &TCArgs, const char *LinkingOutput) const override
ConstructJob - Construct jobs to perform the action JA, writing to Output and with Inputs...
const char * getFilename() const
Definition: InputInfo.h:83
InputInfo - Wrapper for information about an input source.
Definition: InputInfo.h:22
void addCommand(std::unique_ptr< Command > C)
Definition: Compilation.h:205
const char * getShortName() const
Definition: Tool.h:81
Dataflow Directional Tag Classes.
Compilation - A set of tasks to perform for a single driver invocation.
Definition: Compilation.h:45
const ToolChain & getToolChain() const
Definition: Tool.h:83
std::string GetProgramPath(const char *Name) const
Definition: ToolChain.cpp:507