Tool.cpp 1.4 KB

1234567891011121314151617181920212223242526272829303132
  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 "InputInfo.h"
  10. using namespace clang::driver;
  11. Tool::Tool(const char *_Name, const char *_ShortName, const ToolChain &TC,
  12. ResponseFileSupport _ResponseSupport,
  13. llvm::sys::WindowsEncodingMethod _ResponseEncoding,
  14. const char *_ResponseFlag)
  15. : Name(_Name), ShortName(_ShortName), TheToolChain(TC),
  16. ResponseSupport(_ResponseSupport), ResponseEncoding(_ResponseEncoding),
  17. ResponseFlag(_ResponseFlag) {}
  18. Tool::~Tool() {
  19. }
  20. void Tool::ConstructJobMultipleOutputs(Compilation &C, const JobAction &JA,
  21. const InputInfoList &Outputs,
  22. const InputInfoList &Inputs,
  23. const llvm::opt::ArgList &TCArgs,
  24. const char *LinkingOutput) const {
  25. assert(Outputs.size() == 1 && "Expected only one output by default!");
  26. ConstructJob(C, JA, Outputs.front(), Inputs, TCArgs, LinkingOutput);
  27. }