From 474c642172bb4265777caed68f4551a8223524bf Mon Sep 17 00:00:00 2001 From: Simon Pilgrim Date: Thu, 7 Jul 2016 11:24:38 +0000 Subject: [PATCH] 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 --- clang/lib/Basic/Targets.cpp | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/clang/lib/Basic/Targets.cpp b/clang/lib/Basic/Targets.cpp index 4d784d5694ac..80b44fc63538 100644 --- a/clang/lib/Basic/Targets.cpp +++ b/clang/lib/Basic/Targets.cpp @@ -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);