tra added inline comments.
================ Comment at: clang/include/clang/Basic/Cuda.h:55 +static inline const std::vector<CudaArch> CudaKnownArchList() { + return {CudaArch::SM_20, CudaArch::SM_21, CudaArch::SM_30, CudaArch::SM_32, ---------------- jlebar wrote: > Why 'static'? Old habits. Just 'inline' should do. ================ Comment at: clang/include/clang/Basic/Cuda.h:59 + CudaArch::SM_53, CudaArch::SM_60, CudaArch::SM_61, CudaArch::SM_62, + CudaArch::SM_70, CudaArch::SM_72}; +} ---------------- jlebar wrote: > Could we instead rely on the fact that the CudaArch enum is dense and goes > from UNKNOWN to LAST? One less bug to make... Actually this function is not needed. It's a leftover from an old iteration of the code. I'll remove it. As for why array -- that's what I wanted to do. Turns out that iterating over enums is a pain. I can't increment/decrement it and had to cast to an int for that. And then back, in order to use it. https://reviews.llvm.org/D45061 _______________________________________________ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits