[SimplifyLibCalls] Make a function shorter. NFC.
[oota-llvm.git] / lib / Transforms / Utils / SimplifyLibCalls.cpp
index 2eb9938955e89cb343f5361d2f99551bcb0b11df..8ea632546c7d49682f6f3f740a58525c95f06f4c 100644 (file)
@@ -53,16 +53,8 @@ static cl::opt<bool>
 //===----------------------------------------------------------------------===//
 
 static bool ignoreCallingConv(LibFunc::Func Func) {
-  switch (Func) {
-  case LibFunc::abs:
-  case LibFunc::labs:
-  case LibFunc::llabs:
-  case LibFunc::strlen:
-    return true;
-  default:
-    return false;
-  }
-  llvm_unreachable("All cases should be covered in the switch.");
+  return Func == LibFunc::abs || Func == LibFunc::labs ||
+         Func == LibFunc::llabs || Func == LibFunc::strlen;
 }
 
 /// isOnlyUsedInZeroEqualityComparison - Return true if it only matters that the