1 //===- AMDGPUOpenMP.h - AMDGPUOpenMP ToolChain Implementation -*- 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 //===----------------------------------------------------------------------===// 8 9 #ifndef LLVM_CLANG_LIB_DRIVER_TOOLCHAINS_AMDGPUOPENMP_H 10 #define LLVM_CLANG_LIB_DRIVER_TOOLCHAINS_AMDGPUOPENMP_H 11 12 #include "AMDGPU.h" 13 #include "clang/Driver/Tool.h" 14 #include "clang/Driver/ToolChain.h" 15 16 namespace clang { 17 namespace driver { 18 19 namespace toolchains { 20 class AMDGPUOpenMPToolChain; 21 } 22 23 namespace toolchains { 24 25 class LLVM_LIBRARY_VISIBILITY AMDGPUOpenMPToolChain final 26 : public ROCMToolChain { 27 public: 28 AMDGPUOpenMPToolChain(const Driver &D, const llvm::Triple &Triple, 29 const ToolChain &HostTC, 30 const llvm::opt::ArgList &Args); 31 32 const llvm::Triple *getAuxTriple() const override { 33 return &HostTC.getTriple(); 34 } 35 36 llvm::opt::DerivedArgList * 37 TranslateArgs(const llvm::opt::DerivedArgList &Args, StringRef BoundArch, 38 Action::OffloadKind DeviceOffloadKind) const override; 39 void 40 addClangTargetOptions(const llvm::opt::ArgList &DriverArgs, 41 llvm::opt::ArgStringList &CC1Args, 42 Action::OffloadKind DeviceOffloadKind) const override; 43 void addClangWarningOptions(llvm::opt::ArgStringList &CC1Args) const override; 44 CXXStdlibType GetCXXStdlibType(const llvm::opt::ArgList &Args) const override; 45 void 46 AddClangSystemIncludeArgs(const llvm::opt::ArgList &DriverArgs, 47 llvm::opt::ArgStringList &CC1Args) const override; 48 void AddIAMCUIncludeArgs(const llvm::opt::ArgList &DriverArgs, 49 llvm::opt::ArgStringList &CC1Args) const override; 50 51 SanitizerMask getSupportedSanitizers() const override; 52 53 VersionTuple 54 computeMSVCVersion(const Driver *D, 55 const llvm::opt::ArgList &Args) const override; 56 57 llvm::SmallVector<BitCodeLibraryInfo, 12> 58 getDeviceLibs(const llvm::opt::ArgList &Args) const override; 59 60 const ToolChain &HostTC; 61 }; 62 63 } // end namespace toolchains 64 } // end namespace driver 65 } // end namespace clang 66 67 #endif // LLVM_CLANG_LIB_DRIVER_TOOLCHAINS_AMDGPUOPENMP_H 68