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

Simon Pilgrim via llvm-commits llvm-commits at lists.llvm.org
Wed Aug 7 03:00:46 PDT 2024


Author: Simon Pilgrim
Date: 2024-08-07T11:00:22+01:00
New Revision: 8fd5dafc748669a8e4116368fa08b0d1facedfd2

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

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

Added: 
    

Modified: 
    llvm/lib/Object/COFFObjectFile.cpp

Removed: 
    


################################################################################
diff  --git a/llvm/lib/Object/COFFObjectFile.cpp b/llvm/lib/Object/COFFObjectFile.cpp
index 34347e5681358..30a36a458310b 100644
--- a/llvm/lib/Object/COFFObjectFile.cpp
+++ b/llvm/lib/Object/COFFObjectFile.cpp
@@ -2042,6 +2042,7 @@ uint8_t Arm64XRelocRef::getSize() const {
   case COFF::IMAGE_DVRT_ARM64X_FIXUP_TYPE_DELTA:
     return sizeof(uint32_t);
   }
+  llvm_unreachable("Unknown Arm64XFixupType enum");
 }
 
 uint64_t Arm64XRelocRef::getValue() const {


        


More information about the llvm-commits mailing list