25 const llvm::opt::ArgStringList &Args) {
26 llvm::opt::ArgStringList CmdArgs(Args);
29 if (Input.
getType() == types::TY_PP_Asm)
30 CmdArgs.push_back(
"-to-binary");
31 if (Output.
getType() == types::TY_PP_Asm)
32 CmdArgs.push_back(
"--spirv-tools-dis");
38 using namespace std::string_literals;
39 auto VersionedTool =
"llvm-spirv-"s + std::to_string(LLVM_VERSION_MAJOR);
40 std::string ExeCand =
T.getToolChain().GetProgramPath(VersionedTool.c_str());
41 if (!llvm::sys::fs::can_execute(ExeCand))
42 ExeCand =
T.getToolChain().GetProgramPath(
"llvm-spirv");
44 const char *Exec = C.getArgs().MakeArgString(ExeCand);
46 Exec, CmdArgs, Input, Output));
53 const char *LinkingOutput)
const {
55 if (Inputs.size() != 1)
56 llvm_unreachable(
"Invalid number of input files.");
62 Translator = std::make_unique<SPIRV::Translator>(*
this);
77 return SPIRVToolChain::getTranslator();
89 const char *LinkingOutput)
const {
92 ArgStringList CmdArgs;
95 CmdArgs.push_back(
"-o");
99 Args.MakeArgString(
Linker), CmdArgs,
Defines version macros and version-related utility functions for Clang.
__device__ __2f16 float __ockl_bool s
ActionClass getKind() const
Compilation - A set of tasks to perform for a single driver invocation.
const FunctionProtoType * T
static constexpr ResponseFileSupport None()
Returns a ResponseFileSupport indicating that response files are not supported.