[PATCH] D77451: Accept -x cu to indicate language is CUDA, transfer CUDA language flag to header-file arguments
ADRA via Phabricator via cfe-commits
cfe-commits at lists.llvm.org
Wed Apr 8 14:41:07 PDT 2020
ADRAADRA updated this revision to Diff 256111.
ADRAADRA added a comment.
- Update Types.cpp comment
- remove types::TY_CUDA_FATBIN from switch
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D77451/new/
https://reviews.llvm.org/D77451
Files:
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
@@ -114,6 +114,9 @@
case types::TY_ObjCXX:
case types::TY_ObjCXXHeader:
return types::TY_ObjCXX;
+ case types::TY_CUDA:
+ case types::TY_CUDA_DEVICE:
+ return types::TY_CUDA:
default:
return types::TY_INVALID;
}
Index: clang/lib/Driver/Types.cpp
===================================================================
--- clang/lib/Driver/Types.cpp
+++ clang/lib/Driver/Types.cpp
@@ -295,7 +295,10 @@
strcmp(Name, getInfo(Id).Name) == 0)
return Id;
}
-
+ // Accept "cu" as an alias for "cuda" for NVCC compatibility
+ if (strcmp(Name, "cu") == 0) {
+ return types::TY_CUDA;
+ }
return TY_INVALID;
}
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D77451.256111.patch
Type: text/x-patch
Size: 901 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/cfe-commits/attachments/20200408/0a30a383/attachment.bin>
More information about the cfe-commits
mailing list