[PATCH] D94337: Add cuda header type for cuh files

2021-01-13 Thread Ryan Greenblatt via Phabricator via cfe-commits
rgreenblatt added a comment. In D94337#2496329 , @tra wrote: > We were talking about the case where clang can't expand CUDA-specific macros. Somehow I totally forgot about or missed this context. > I think this kind of compilation pipeline restructuring

[PATCH] D94337: Add cuda header type for cuh files

2021-01-11 Thread Ryan Greenblatt via Phabricator via cfe-commits
rgreenblatt added a comment. In D94337#2491825 , @tra wrote: > 'Works' is not exactly the same as 'works correctly'. This example makes > `a()` look like a regular host function, instead of the kernel, and that > affects how the rest of the TU get parsed

[PATCH] D94337: Add cuda header type for cuh files

2021-01-11 Thread Ryan Greenblatt via Phabricator via cfe-commits
rgreenblatt updated this revision to Diff 315986. rgreenblatt added a comment. Added CUDAHeader_DEVICE to propery handle split compilation Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D94337/new/ https://reviews.llvm.org/D94337 Files: clang/incl

[PATCH] D94337: Add cuda header type for cuh files

2021-01-11 Thread Ryan Greenblatt via Phabricator via cfe-commits
rgreenblatt added a comment. In D94337#2491515 , @tra wrote: > Does it make sense? Yep, most of what your saying makes sense to me. Thanks for taking the time to review this. A few notes: > That would still require properly defined CUDA macros. CUDA in

[PATCH] D94337: Add cuda header type for cuh files

2021-01-11 Thread Ryan Greenblatt via Phabricator via cfe-commits
rgreenblatt added a comment. In D94337#2490828 , @tra wrote: > The problem is that just telling compiler that the header is a CUDA source is > not sufficient. Clang relies on a lot of CUDA SDK headers in order to make > the standard CUDA things like `__h

[PATCH] D94337: Add cuda header type for cuh files

2021-01-09 Thread Ryan Greenblatt via Phabricator via cfe-commits
rgreenblatt added a comment. Just to be clear, this is currently a WIP - it would still be good if someone took a look at this because I don't know if this approach makes any sense. I made this change with the aim of allowing language servers and other tools to cleanly handle .cuh files, but in

[PATCH] D94337: Add cuda header type for cuh files

2021-01-08 Thread Ryan Greenblatt via Phabricator via cfe-commits
rgreenblatt updated this revision to Diff 315573. rgreenblatt added a comment. Fixed completion extension bug Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D94337/new/ https://reviews.llvm.org/D94337 Files: clang/include/clang/Driver/Types.def

[PATCH] D94337: Add cuda header type for cuh files

2021-01-08 Thread Ryan Greenblatt via Phabricator via cfe-commits
rgreenblatt updated this revision to Diff 315568. rgreenblatt added a comment. Fused commits so CI passes??? Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D94337/new/ https://reviews.llvm.org/D94337 Files: clang/include/clang/Driver/Types.def c

[PATCH] D94349: Fix some missing applications of TY_CUDAHeader

2021-01-08 Thread Ryan Greenblatt via Phabricator via cfe-commits
rgreenblatt abandoned this revision. rgreenblatt added a comment. Oops didn't mean to open new revision. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D94349/new/ https://reviews.llvm.org/D94349 ___ cfe-c

[PATCH] D94337: Add cuda header type for cuh files

2021-01-08 Thread Ryan Greenblatt via Phabricator via cfe-commits
rgreenblatt updated this revision to Diff 315542. rgreenblatt added a comment. Fixed some missing applications Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D94337/new/ https://reviews.llvm.org/D94337 Files: clang/lib/Driver/Driver.cpp clang/li

[PATCH] D94349: Fix some missing applications of TY_CUDAHeader

2021-01-08 Thread Ryan Greenblatt via Phabricator via cfe-commits
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

[PATCH] D94337: Add cuda header type for cuh files

2021-01-08 Thread Ryan Greenblatt via Phabricator via cfe-commits
rgreenblatt added a comment. I haven't added any tests for this change. This is my first commit, so I am not sure how to write a test or what tests are appropriate. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D94337/new/ https://reviews.llvm.org/

[PATCH] D94337: Add cuda header type for cuh files

2021-01-08 Thread Ryan Greenblatt via Phabricator via cfe-commits
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. This adds a cuda header type with file extension "cuh". The output type file extension is "cuhi" - not sure if