[PATCH] D91034: [Frontend] Treat CUDA header files as CUDA source files
Anatoliy Tomilov via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Wed Nov 11 00:49:19 PST 2020
tomilov updated this revision to Diff 304422.
tomilov added a comment.
Test added.
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D91034/new/
https://reviews.llvm.org/D91034
Files:
lib/Frontend/FrontendOptions.cpp
test/Parser/cuda-check-input-kind-assoc.cuh
Index: test/Parser/cuda-check-input-kind-assoc.cuh
===================================================================
--- /dev/null
+++ test/Parser/cuda-check-input-kind-assoc.cuh
@@ -0,0 +1,5 @@
+// RUN: %clang_cc1 -fsyntax-only %s
+
+// Check input kind association for cuh extension.
+
+__attribute__((host, device)) void hd_fn() {}
Index: lib/Frontend/FrontendOptions.cpp
===================================================================
--- lib/Frontend/FrontendOptions.cpp
+++ lib/Frontend/FrontendOptions.cpp
@@ -29,7 +29,7 @@
.Case("cppm", Language::CXX)
.Case("iim", InputKind(Language::CXX).getPreprocessed())
.Case("cl", Language::OpenCL)
- .Case("cu", Language::CUDA)
+ .Cases("cu", "cuh", Language::CUDA)
.Cases("ll", "bc", Language::LLVM_IR)
.Default(Language::Unknown);
}
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D91034.304422.patch
Type: text/x-patch
Size: 836 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20201111/00f3e312/attachment.bin>
More information about the llvm-commits
mailing list