[Frontend] Treat .cuh files as CUDA source files

to synchronize with tools/clang-format/git-clang-format

tra: Keeping them in sync does have a minor benefit of not raising a question why the two maps are different.

Differential Revision: https://reviews.llvm.org/D91034
This commit is contained in:
Anatoliy Tomilov 2020-11-12 11:42:52 -08:00 committed by Fangrui Song
parent 3ce5f95716
commit e7c7a19826
2 changed files with 6 additions and 1 deletions

View File

@ -29,7 +29,7 @@ InputKind FrontendOptions::getInputKindForExtension(StringRef Extension) {
.Case("cppm", Language::CXX)
.Case("iim", InputKind(Language::CXX).getPreprocessed())
.Case("cl", Language::OpenCL)
.Case("cu", Language::CUDA)
.Cases("cu", "cuh", Language::CUDA)
.Case("hip", Language::HIP)
.Cases("ll", "bc", Language::LLVM_IR)
.Default(Language::Unknown);

View File

@ -0,0 +1,5 @@
// RUN: %clang_cc1 -fsyntax-only -Werror %s
// Check input kind association for cuh extension.
__attribute__((host, device)) void hd_fn() {}