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

Simon Pilgrim via cfe-commits cfe-commits at lists.llvm.org
Thu Jul 7 04:12:05 PDT 2016


Author: rksimon
Date: Thu Jul  7 06:12:02 2016
New Revision: 274746

URL: http://llvm.org/viewvc/llvm-project?rev=274746&view=rev
Log:
Fix "not all control paths return a value" warning on MSVC

Modified:
    cfe/trunk/lib/Basic/Targets.cpp

Modified: cfe/trunk/lib/Basic/Targets.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/Basic/Targets.cpp?rev=274746&r1=274745&r2=274746&view=diff
==============================================================================
--- cfe/trunk/lib/Basic/Targets.cpp (original)
+++ cfe/trunk/lib/Basic/Targets.cpp Thu Jul  7 06:12:02 2016
@@ -1804,6 +1804,8 @@ public:
           return "610";
         case CudaArch::SM_62:
           return "620";
+         default:
+           llvm_unreachable("unhandled CudaArch");
         }
       }();
       Builder.defineMacro("__CUDA_ARCH__", CUDAArchCode);




More information about the cfe-commits mailing list