Tool.cpp 1.1 KB

123456789101112131415161718192021222324252627
  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. #include "clang/Driver/Tool.h"
  9. #include "clang/Driver/InputInfo.h"
  10. using namespace clang::driver;
  11. Tool::Tool(const char *_Name, const char *_ShortName, const ToolChain &TC)
  12. : Name(_Name), ShortName(_ShortName), TheToolChain(TC) {}
  13. Tool::~Tool() {
  14. }
  15. void Tool::ConstructJobMultipleOutputs(Compilation &C, const JobAction &JA,
  16. const InputInfoList &Outputs,
  17. const InputInfoList &Inputs,
  18. const llvm::opt::ArgList &TCArgs,
  19. const char *LinkingOutput) const {
  20. assert(Outputs.size() == 1 && "Expected only one output by default!");
  21. ConstructJob(C, JA, Outputs.front(), Inputs, TCArgs, LinkingOutput);
  22. }