[llvm] 94b2b1d - Fix MSVC "not all control paths return a value" warning. NFC

Simon Pilgrim via llvm-commits llvm-commits at lists.llvm.org
Thu Jul 4 02:36:35 PDT 2024


Author: Simon Pilgrim
Date: 2024-07-04T10:35:32+01:00
New Revision: 94b2b1d74a4488e61d7992b12d1042ae6a99f3d5

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

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

Added: 
    

Modified: 
    llvm/lib/SandboxIR/SandboxIR.cpp

Removed: 
    


################################################################################
diff  --git a/llvm/lib/SandboxIR/SandboxIR.cpp b/llvm/lib/SandboxIR/SandboxIR.cpp
index 47e1ae4422c98..ea2f15754d340 100644
--- a/llvm/lib/SandboxIR/SandboxIR.cpp
+++ b/llvm/lib/SandboxIR/SandboxIR.cpp
@@ -103,6 +103,7 @@ const char *Instruction::getOpcodeName(Opcode Opc) {
 #define DEF_INSTR(ID, OPC, CLASS) OPC
 #include "llvm/SandboxIR/SandboxIRValues.def"
   }
+  llvm_unreachable("Unknown Opcode");
 }
 
 bool Instruction::classof(const sandboxir::Value *From) {


        


More information about the llvm-commits mailing list