[clang] 126a72f - Fix MSVC "not all control paths return a value" warnings. NFCI.

Simon Pilgrim via cfe-commits cfe-commits at lists.llvm.org
Thu Oct 24 13:40:30 PDT 2019


Author: Simon Pilgrim
Date: 2019-10-24T13:40:13-07:00
New Revision: 126a72fcbf7e5e4d958d3804033710c0a4efbe39

URL: https://github.com/llvm/llvm-project/commit/126a72fcbf7e5e4d958d3804033710c0a4efbe39
DIFF: https://github.com/llvm/llvm-project/commit/126a72fcbf7e5e4d958d3804033710c0a4efbe39.diff

LOG: Fix MSVC "not all control paths return a value" warnings. NFCI.

Added: 
    

Modified: 
    clang/utils/TableGen/MveEmitter.cpp

Removed: 
    


################################################################################
diff  --git a/clang/utils/TableGen/MveEmitter.cpp b/clang/utils/TableGen/MveEmitter.cpp
index c4270ff586cf..9c3328e3bbfb 100644
--- a/clang/utils/TableGen/MveEmitter.cpp
+++ b/clang/utils/TableGen/MveEmitter.cpp
@@ -158,6 +158,7 @@ inline std::string toLetter(ScalarTypeKind kind) {
   case ScalarTypeKind::Float:
     return "f";
   }
+  llvm_unreachable("Unhandled ScalarTypeKind enum");
 }
 inline std::string toCPrefix(ScalarTypeKind kind) {
   switch (kind) {
@@ -168,6 +169,7 @@ inline std::string toCPrefix(ScalarTypeKind kind) {
   case ScalarTypeKind::Float:
     return "float";
   }
+  llvm_unreachable("Unhandled ScalarTypeKind enum");
 }
 
 class VoidType : public Type {


        


More information about the cfe-commits mailing list