[llvm] d32d20f - NumericalStabilitySanitizer.cpp - fix MSVC "not all control paths return a value" warnings. NFC.

Simon Pilgrim via llvm-commits llvm-commits at lists.llvm.org
Mon Jul 1 04:27:06 PDT 2024


Author: Simon Pilgrim
Date: 2024-07-01T12:10:36+01:00
New Revision: d32d20f3a05abf74ecc11848a672d4cac4fa45cd

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

LOG: NumericalStabilitySanitizer.cpp - fix MSVC "not all control paths return a value" warnings. NFC.

Added: 
    

Modified: 
    llvm/lib/Transforms/Instrumentation/NumericalStabilitySanitizer.cpp

Removed: 
    


################################################################################
diff  --git a/llvm/lib/Transforms/Instrumentation/NumericalStabilitySanitizer.cpp b/llvm/lib/Transforms/Instrumentation/NumericalStabilitySanitizer.cpp
index 6207d4246925c..99b1c779f3167 100644
--- a/llvm/lib/Transforms/Instrumentation/NumericalStabilitySanitizer.cpp
+++ b/llvm/lib/Transforms/Instrumentation/NumericalStabilitySanitizer.cpp
@@ -239,6 +239,7 @@ static Type *typeFromFTValueType(FTValueType VT, LLVMContext &Context) {
   case kNumValueTypes:
     return nullptr;
   }
+  llvm_unreachable("Unhandled FTValueType enum");
 }
 
 // Returns the type name for an FTValueType.
@@ -253,6 +254,7 @@ static const char *typeNameFromFTValueType(FTValueType VT) {
   case kNumValueTypes:
     return nullptr;
   }
+  llvm_unreachable("Unhandled FTValueType enum");
 }
 
 // A specific mapping configuration of application type to shadow type for nsan
@@ -395,6 +397,7 @@ class CheckLoc {
     case kStore:
       return Builder.CreatePtrToInt(Address, IntptrTy);
     }
+    llvm_unreachable("Unhandled CheckType enum");
   }
 
 private:


        


More information about the llvm-commits mailing list