1 //===--- InterfaceStubs.cpp - Base InterfaceStubs Implementations C++ ---===//
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
7 //===----------------------------------------------------------------------===//
9 #include "InterfaceStubs.h"
10 #include "CommonArgs.h"
11 #include "clang/Driver/Compilation.h"
17 void Merger::ConstructJob(Compilation &C, const JobAction &JA,
18 const InputInfo &Output, const InputInfoList &Inputs,
19 const llvm::opt::ArgList &Args,
20 const char *LinkingOutput) const {
21 std::string Merger = getToolChain().GetProgramPath(getShortName());
22 llvm::opt::ArgStringList CmdArgs;
23 CmdArgs.push_back("-action");
24 CmdArgs.push_back(Args.getLastArg(options::OPT_emit_merged_ifs)
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),
34 } // namespace ifstool