diff options
author | Yaxun Liu <Yaxun.Liu@amd.com> | 2018-05-11 19:21:39 +0000 |
---|---|---|
committer | Yaxun Liu <Yaxun.Liu@amd.com> | 2018-05-11 19:21:39 +0000 |
commit | 6e79e3ea0e0d46dce51b57af77514060bb77c499 (patch) | |
tree | ad0434b448a0817e9d5ae8c1369ea11620f13015 /lib/Driver/Types.cpp | |
parent | daf5c0ea220f8bfd7d57193682172d11803d0f0c (diff) | |
download | clang-6e79e3ea0e0d46dce51b57af77514060bb77c499.tar.gz |
[HIP] Set proper triple and offload kind for the toolchain
Also introduce --hip-link option to indicate HIP for linking.
Differential Revision: https://reviews.llvm.org/D46475
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@332123 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/Driver/Types.cpp')
-rw-r--r-- | lib/Driver/Types.cpp | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/lib/Driver/Types.cpp b/lib/Driver/Types.cpp index bcb35b1e0f..45bb699cfb 100644 --- a/lib/Driver/Types.cpp +++ b/lib/Driver/Types.cpp @@ -172,6 +172,15 @@ bool types::isCuda(ID Id) { case TY_CUDA: case TY_PP_CUDA: case TY_CUDA_DEVICE: + return true; + } +} + +bool types::isHIP(ID Id) { + switch (Id) { + default: + return false; + case TY_HIP: case TY_PP_HIP: case TY_HIP_DEVICE: @@ -230,6 +239,7 @@ types::ID types::lookupTypeForExtension(llvm::StringRef Ext) { .Case("fpp", TY_Fortran) .Case("FPP", TY_Fortran) .Case("gch", TY_PCH) + .Case("hip", TY_HIP) .Case("hpp", TY_CXXHeader) .Case("iim", TY_PP_CXXModule) .Case("lib", TY_Object) |