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

Simon Pilgrim via llvm-commits llvm-commits at lists.llvm.org
Wed Aug 16 01:54:47 PDT 2023


Author: Simon Pilgrim
Date: 2023-08-16T09:54:30+01:00
New Revision: af315097c6d9898df11672ce23fb9418c58d5ff6

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

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

Added: 
    

Modified: 
    llvm/lib/Target/TargetMachine.cpp

Removed: 
    


################################################################################
diff  --git a/llvm/lib/Target/TargetMachine.cpp b/llvm/lib/Target/TargetMachine.cpp
index 4ee7328dc2ed55..323b7c0c0bf1f8 100644
--- a/llvm/lib/Target/TargetMachine.cpp
+++ b/llvm/lib/Target/TargetMachine.cpp
@@ -89,6 +89,7 @@ uint64_t TargetMachine::getMaxCodeSize() const {
   case CodeModel::Large:
     return llvm::maxUIntN(64);
   }
+  llvm_unreachable("Unhandled CodeModel enum");
 }
 
 /// Get the IR-specified TLS model for Var.


        


More information about the llvm-commits mailing list