forked from OSchip/llvm-project
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:
parent
c6db895ece
commit
474c642172
|
@ -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);
|
||||
|
|
Loading…
Reference in New Issue