This time without causing a 'all enums handled' warning on other compilers.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@274748
91177308-0d34-0410-b5e6-
96231b3b80d8
// Set __CUDA_ARCH__ for the GPU specified.
std::string CUDAArchCode = [this] {
switch (GPU) {
- case CudaArch::UNKNOWN:
+ default:
assert(false && "No GPU arch when compiling CUDA device code.");
return "";
case CudaArch::SM_20:
return "610";
case CudaArch::SM_62:
return "620";
- default:
- llvm_unreachable("unhandled CudaArch");
}
}();
Builder.defineMacro("__CUDA_ARCH__", CUDAArchCode);