[llvm] e3d4cac - Fix MSVC "not all control paths return a value" warning

Simon Pilgrim via llvm-commits llvm-commits at lists.llvm.org
Wed Feb 21 05:55:49 PST 2024


Author: Simon Pilgrim
Date: 2024-02-21T13:53:48Z
New Revision: e3d4cac2bcbdb719a0d29055c8c60df0e98e0126

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

LOG: Fix MSVC "not all control paths return a value" warning

Added: 
    

Modified: 
    llvm/lib/Target/RISCV/RISCVISelLowering.cpp

Removed: 
    


################################################################################
diff  --git a/llvm/lib/Target/RISCV/RISCVISelLowering.cpp b/llvm/lib/Target/RISCV/RISCVISelLowering.cpp
index 7d6448dc35f9a9..f7275eb7c77bb3 100644
--- a/llvm/lib/Target/RISCV/RISCVISelLowering.cpp
+++ b/llvm/lib/Target/RISCV/RISCVISelLowering.cpp
@@ -13397,6 +13397,7 @@ struct NodeExtensionHelper {
     case ExtKind::FPExt:
       return RISCVISD::FP_EXTEND_VL;
     }
+    llvm_unreachable("Unknown ExtKind enum");
   }
 
   /// Get or create a value that can feed \p Root with the given extension \p


        


More information about the llvm-commits mailing list