llvm_runner.h 792 B

1234567891011121314151617181920212223242526
  1. // Part of the Carbon Language project, under the Apache License v2.0 with LLVM
  2. // Exceptions. See /LICENSE for license information.
  3. // SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
  4. #ifndef CARBON_TOOLCHAIN_DRIVER_LLVM_RUNNER_H_
  5. #define CARBON_TOOLCHAIN_DRIVER_LLVM_RUNNER_H_
  6. #include "llvm/ADT/ArrayRef.h"
  7. #include "llvm/ADT/StringRef.h"
  8. #include "toolchain/base/llvm_tools.h"
  9. #include "toolchain/driver/tool_runner_base.h"
  10. namespace Carbon {
  11. // Runs any of the LLVM tools in a manner similar to invoking it with the
  12. // provided arguments.
  13. class LLVMRunner : ToolRunnerBase {
  14. public:
  15. using ToolRunnerBase::ToolRunnerBase;
  16. auto Run(LLVMTool tool, llvm::ArrayRef<llvm::StringRef> args) -> bool;
  17. };
  18. } // namespace Carbon
  19. #endif // CARBON_TOOLCHAIN_DRIVER_LLVM_RUNNER_H_