[DFAJumpThreading] Remove incoming StartBlock from all phis when unfolding select...
[llvm-project.git] / clang / lib / Driver / ToolChains / HLSL.h
blob7b775b89743188d1f2ca6a27f0990c7ffdb6d9df
1 //===--- HLSL.h - HLSL ToolChain Implementations ----------------*- C++ -*-===//
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 //===----------------------------------------------------------------------===//
9 #ifndef LLVM_CLANG_LIB_DRIVER_TOOLCHAINS_HLSL_H
10 #define LLVM_CLANG_LIB_DRIVER_TOOLCHAINS_HLSL_H
12 #include "clang/Driver/Tool.h"
13 #include "clang/Driver/ToolChain.h"
15 namespace clang {
16 namespace driver {
18 namespace tools {
20 namespace hlsl {
21 class LLVM_LIBRARY_VISIBILITY Validator : public Tool {
22 public:
23 Validator(const ToolChain &TC) : Tool("hlsl::Validator", "dxv", TC) {}
25 bool hasIntegratedCPP() const override { return false; }
27 void ConstructJob(Compilation &C, const JobAction &JA,
28 const InputInfo &Output, const InputInfoList &Inputs,
29 const llvm::opt::ArgList &TCArgs,
30 const char *LinkingOutput) const override;
32 } // namespace hlsl
33 } // namespace tools
35 namespace toolchains {
37 class LLVM_LIBRARY_VISIBILITY HLSLToolChain : public ToolChain {
38 public:
39 HLSLToolChain(const Driver &D, const llvm::Triple &Triple,
40 const llvm::opt::ArgList &Args);
41 Tool *getTool(Action::ActionClass AC) const override;
43 bool isPICDefault() const override { return false; }
44 bool isPIEDefault(const llvm::opt::ArgList &Args) const override {
45 return false;
47 bool isPICDefaultForced() const override { return false; }
49 llvm::opt::DerivedArgList *
50 TranslateArgs(const llvm::opt::DerivedArgList &Args, StringRef BoundArch,
51 Action::OffloadKind DeviceOffloadKind) const override;
52 static std::optional<std::string> parseTargetProfile(StringRef TargetProfile);
53 bool requiresValidation(llvm::opt::DerivedArgList &Args) const;
55 private:
56 mutable std::unique_ptr<tools::hlsl::Validator> Validator;
59 } // end namespace toolchains
60 } // end namespace driver
61 } // end namespace clang
63 #endif // LLVM_CLANG_LIB_DRIVER_TOOLCHAINS_HLSL_H