xref: /freebsd-src/contrib/llvm-project/clang/lib/Driver/ToolChains/SPIRV.h (revision 349cc55c9796c4596a5b9904cd3281af295f878f)
1*349cc55cSDimitry Andric //===--- SPIRV.h - SPIR-V Tool Implementations ------------------*- C++ -*-===//
2*349cc55cSDimitry Andric //
3*349cc55cSDimitry Andric // Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
4*349cc55cSDimitry Andric // See https://llvm.org/LICENSE.txt for license information.
5*349cc55cSDimitry Andric // SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
6*349cc55cSDimitry Andric //
7*349cc55cSDimitry Andric //===----------------------------------------------------------------------===//
8*349cc55cSDimitry Andric 
9*349cc55cSDimitry Andric #ifndef LLVM_CLANG_LIB_DRIVER_TOOLCHAINS_SPIRV_H
10*349cc55cSDimitry Andric #define LLVM_CLANG_LIB_DRIVER_TOOLCHAINS_SPIRV_H
11*349cc55cSDimitry Andric 
12*349cc55cSDimitry Andric #include "clang/Driver/Tool.h"
13*349cc55cSDimitry Andric #include "clang/Driver/ToolChain.h"
14*349cc55cSDimitry Andric 
15*349cc55cSDimitry Andric namespace clang {
16*349cc55cSDimitry Andric namespace driver {
17*349cc55cSDimitry Andric namespace tools {
18*349cc55cSDimitry Andric namespace SPIRV {
19*349cc55cSDimitry Andric 
20*349cc55cSDimitry Andric void addTranslatorArgs(const llvm::opt::ArgList &InArgs,
21*349cc55cSDimitry Andric                        llvm::opt::ArgStringList &OutArgs);
22*349cc55cSDimitry Andric 
23*349cc55cSDimitry Andric void constructTranslateCommand(Compilation &C, const Tool &T,
24*349cc55cSDimitry Andric                                const JobAction &JA, const InputInfo &Output,
25*349cc55cSDimitry Andric                                const InputInfo &Input,
26*349cc55cSDimitry Andric                                const llvm::opt::ArgStringList &Args);
27*349cc55cSDimitry Andric 
28*349cc55cSDimitry Andric class LLVM_LIBRARY_VISIBILITY Translator : public Tool {
29*349cc55cSDimitry Andric public:
30*349cc55cSDimitry Andric   Translator(const ToolChain &TC)
31*349cc55cSDimitry Andric       : Tool("SPIR-V::Translator", "llvm-spirv", TC) {}
32*349cc55cSDimitry Andric 
33*349cc55cSDimitry Andric   bool hasIntegratedCPP() const override { return false; }
34*349cc55cSDimitry Andric   bool hasIntegratedAssembler() const override { return true; }
35*349cc55cSDimitry Andric 
36*349cc55cSDimitry Andric   void ConstructJob(Compilation &C, const JobAction &JA,
37*349cc55cSDimitry Andric                     const InputInfo &Output, const InputInfoList &Inputs,
38*349cc55cSDimitry Andric                     const llvm::opt::ArgList &TCArgs,
39*349cc55cSDimitry Andric                     const char *LinkingOutput) const override;
40*349cc55cSDimitry Andric };
41*349cc55cSDimitry Andric 
42*349cc55cSDimitry Andric } // namespace SPIRV
43*349cc55cSDimitry Andric } // namespace tools
44*349cc55cSDimitry Andric } // namespace driver
45*349cc55cSDimitry Andric } // namespace clang
46*349cc55cSDimitry Andric #endif
47