Fix "not all control paths return a value" warning on MSVC

This time without causing a 'all enums handled' warning on other compilers.

llvm-svn: 274748
This commit is contained in:
Simon Pilgrim 2016-07-07 11:24:38 +00:00
parent c6db895ece
commit 474c642172
1 changed files with 1 additions and 3 deletions

View File

@ -1777,7 +1777,7 @@ public:
// 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:
@ -1804,8 +1804,6 @@ public:
return "610";
case CudaArch::SM_62:
return "620";
default:
llvm_unreachable("unhandled CudaArch");
}
}();
Builder.defineMacro("__CUDA_ARCH__", CUDAArchCode);