[llvm] 759beda - Fix MSVC "not all control paths return a value" warning. NFCI.

Simon Pilgrim via llvm-commits llvm-commits at lists.llvm.org
Wed Sep 28 02:56:56 PDT 2022


Author: Simon Pilgrim
Date: 2022-09-28T10:56:37+01:00
New Revision: 759bedade53ebd34e0a9fb5356f35834c1af1c5b

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

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

Added: 
    

Modified: 
    llvm/lib/Target/Hexagon/HexagonVectorCombine.cpp

Removed: 
    


################################################################################
diff  --git a/llvm/lib/Target/Hexagon/HexagonVectorCombine.cpp b/llvm/lib/Target/Hexagon/HexagonVectorCombine.cpp
index 9e28ec382e38b..1b4e8079eb4c2 100644
--- a/llvm/lib/Target/Hexagon/HexagonVectorCombine.cpp
+++ b/llvm/lib/Target/Hexagon/HexagonVectorCombine.cpp
@@ -1001,6 +1001,7 @@ auto HexagonVectorCombine::getSizeOf(const Type *Ty, SizeKind Kind) const
   case Alloc:
     return DL.getTypeAllocSize(NcTy).getFixedValue();
   }
+  llvm_unreachable("Unhandled SizeKind enum");
 }
 
 auto HexagonVectorCombine::getTypeAlignment(Type *Ty) const -> int {


        


More information about the llvm-commits mailing list