1 //===- AMDGPUOpenMP.h - AMDGPUOpenMP ToolChain Implementation -*- C++ -*---===//
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
7 //===----------------------------------------------------------------------===//
9 #ifndef LLVM_CLANG_LIB_DRIVER_TOOLCHAINS_AMDGPUOPENMP_H
10 #define LLVM_CLANG_LIB_DRIVER_TOOLCHAINS_AMDGPUOPENMP_H
13 #include "clang/Driver/Tool.h"
14 #include "clang/Driver/ToolChain.h"
19 namespace toolchains
{
20 class AMDGPUOpenMPToolChain
;
23 namespace toolchains
{
25 class LLVM_LIBRARY_VISIBILITY AMDGPUOpenMPToolChain final
26 : public ROCMToolChain
{
28 AMDGPUOpenMPToolChain(const Driver
&D
, const llvm::Triple
&Triple
,
29 const ToolChain
&HostTC
,
30 const llvm::opt::ArgList
&Args
);
32 const llvm::Triple
*getAuxTriple() const override
{
33 return &HostTC
.getTriple();
36 llvm::opt::DerivedArgList
*
37 TranslateArgs(const llvm::opt::DerivedArgList
&Args
, StringRef BoundArch
,
38 Action::OffloadKind DeviceOffloadKind
) const override
;
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 AddClangCXXStdlibIncludeArgs(
46 const llvm::opt::ArgList
&Args
,
47 llvm::opt::ArgStringList
&CC1Args
) const override
;
49 AddClangSystemIncludeArgs(const llvm::opt::ArgList
&DriverArgs
,
50 llvm::opt::ArgStringList
&CC1Args
) const override
;
51 void AddIAMCUIncludeArgs(const llvm::opt::ArgList
&DriverArgs
,
52 llvm::opt::ArgStringList
&CC1Args
) const override
;
54 SanitizerMask
getSupportedSanitizers() const override
;
57 computeMSVCVersion(const Driver
*D
,
58 const llvm::opt::ArgList
&Args
) const override
;
60 llvm::SmallVector
<BitCodeLibraryInfo
, 12>
61 getDeviceLibs(const llvm::opt::ArgList
&Args
) const override
;
63 const ToolChain
&HostTC
;
66 } // end namespace toolchains
67 } // end namespace driver
68 } // end namespace clang
70 #endif // LLVM_CLANG_LIB_DRIVER_TOOLCHAINS_AMDGPUOPENMP_H