[PATCH] D91034: [Frontend] Treat CUDA header files as CUDA source files
Anatoliy Tomilov via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Sun Nov 8 09:08:59 PST 2020
tomilov created this revision.
tomilov created this object with edit policy "Administrators".
tomilov added projects: clang, LLVM.
Herald added subscribers: llvm-commits, yaxunl.
tomilov requested review of this revision.
Clang supports compiling CUDA source files,
CUDA header files may contain CUDA specific code
that is why they have special extension, which
can be recognized by nvcc (CUDA compiler driver)
as CUDA source file.
Treat them as CUDA source files.
Repository:
rG LLVM Github Monorepo
https://reviews.llvm.org/D91034
Files:
lib/Frontend/FrontendOptions.cpp
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.303726.patch
Type: text/x-patch
Size: 499 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20201108/a3d8b57e/attachment.bin>
More information about the llvm-commits
mailing list