[PATCH] D94349: Fix some missing applications of TY_CUDAHeader
Ryan Greenblatt via Phabricator via cfe-commits
cfe-commits at lists.llvm.org
Fri Jan 8 15:55:06 PST 2021
rgreenblatt created this revision.
Herald added a subscriber: yaxunl.
rgreenblatt requested review of this revision.
Herald added a project: clang.
Herald added a subscriber: cfe-commits.
Repository:
rG LLVM Github Monorepo
https://reviews.llvm.org/D94349
Files:
clang/lib/Driver/Driver.cpp
clang/lib/Driver/Types.cpp
clang/lib/Tooling/InterpolatingCompilationDatabase.cpp
Index: clang/lib/Tooling/InterpolatingCompilationDatabase.cpp
===================================================================
--- clang/lib/Tooling/InterpolatingCompilationDatabase.cpp
+++ clang/lib/Tooling/InterpolatingCompilationDatabase.cpp
@@ -115,6 +115,7 @@
case types::TY_ObjCXXHeader:
return types::TY_ObjCXX;
case types::TY_CUDA:
+ case types::TY_CUDAHeader:
case types::TY_CUDA_DEVICE:
return types::TY_CUDA;
default:
Index: clang/lib/Driver/Types.cpp
===================================================================
--- clang/lib/Driver/Types.cpp
+++ clang/lib/Driver/Types.cpp
@@ -97,13 +97,27 @@
bool types::canTypeBeUserSpecified(ID Id) {
static const clang::driver::types::ID kStaticLangageTypes[] = {
- TY_CUDA_DEVICE, TY_HIP_DEVICE, TY_PP_CHeader,
- TY_PP_ObjCHeader, TY_PP_CXXHeader, TY_PP_ObjCXXHeader,
- TY_PP_CXXModule, TY_LTO_IR, TY_LTO_BC,
- TY_Plist, TY_RewrittenObjC, TY_RewrittenLegacyObjC,
- TY_Remap, TY_PCH, TY_Object,
- TY_Image, TY_dSYM, TY_Dependencies,
- TY_CUDA_FATBIN, TY_HIP_FATBIN};
+ TY_CUDA_DEVICE,
+ TY_HIP_DEVICE,
+ TY_PP_CHeader,
+ TY_PP_ObjCHeader,
+ TY_PP_CXXHeader,
+ TY_PP_ObjCXXHeader,
+ TY_PP_CUDAHeader,
+ TY_PP_CXXModule,
+ TY_LTO_IR,
+ TY_LTO_BC,
+ TY_Plist,
+ TY_RewrittenObjC,
+ TY_RewrittenLegacyObjC,
+ TY_Remap,
+ TY_PCH,
+ TY_Object,
+ TY_Image,
+ TY_dSYM,
+ TY_Dependencies,
+ TY_CUDA_FATBIN,
+ TY_HIP_FATBIN};
return !llvm::is_contained(kStaticLangageTypes, Id);
}
@@ -128,6 +142,7 @@
case TY_C: case TY_PP_C:
case TY_CL:
case TY_CUDA: case TY_PP_CUDA:
+ case TY_CUDAHeader: case TY_PP_CUDAHeader:
case TY_CUDA_DEVICE:
case TY_HIP:
case TY_PP_HIP:
@@ -171,6 +186,7 @@
case TY_ObjCXXHeader: case TY_PP_ObjCXXHeader:
case TY_CXXModule: case TY_PP_CXXModule:
case TY_CUDA: case TY_PP_CUDA: case TY_CUDA_DEVICE:
+ case TY_CUDAHeader: case TY_PP_CUDAHeader:
case TY_HIP:
case TY_PP_HIP:
case TY_HIP_DEVICE:
@@ -251,6 +267,7 @@
.Case("cl", TY_CL)
.Case("cp", TY_CXX)
.Case("cu", TY_CUDA)
+ .Case("cuh", TY_CUDAHeader)
.Case("hh", TY_CXXHeader)
.Case("ii", TY_PP_CXX)
.Case("ll", TY_LLVM_IR)
@@ -267,6 +284,7 @@
.Case("c++", TY_CXX)
.Case("C++", TY_CXX)
.Case("cui", TY_PP_CUDA)
+ .Case("cuhi", TY_PP_CUDAHeader)
.Case("cxx", TY_CXX)
.Case("CXX", TY_CXX)
.Case("F90", TY_Fortran)
Index: clang/lib/Driver/Driver.cpp
===================================================================
--- clang/lib/Driver/Driver.cpp
+++ clang/lib/Driver/Driver.cpp
@@ -2463,6 +2463,7 @@
// If the host input is not CUDA or HIP, we don't need to bother about
// this input.
if (!(IA->getType() == types::TY_CUDA ||
+ IA->getType() == types::TY_CUDAHeader ||
IA->getType() == types::TY_HIP ||
IA->getType() == types::TY_PP_HIP)) {
// The builder will ignore this input.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D94349.315541.patch
Type: text/x-patch
Size: 3226 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/cfe-commits/attachments/20210108/4db086f2/attachment-0001.bin>
More information about the cfe-commits
mailing list