[llvm] r252970 - [SimplifyLibCalls] Make a function shorter. NFC.
Davide Italiano via llvm-commits
llvm-commits at lists.llvm.org
Thu Nov 12 15:39:00 PST 2015
Author: davide
Date: Thu Nov 12 17:39:00 2015
New Revision: 252970
URL: http://llvm.org/viewvc/llvm-project?rev=252970&view=rev
Log:
[SimplifyLibCalls] Make a function shorter. NFC.
Modified:
llvm/trunk/lib/Transforms/Utils/SimplifyLibCalls.cpp
Modified: llvm/trunk/lib/Transforms/Utils/SimplifyLibCalls.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Transforms/Utils/SimplifyLibCalls.cpp?rev=252970&r1=252969&r2=252970&view=diff
==============================================================================
--- llvm/trunk/lib/Transforms/Utils/SimplifyLibCalls.cpp (original)
+++ llvm/trunk/lib/Transforms/Utils/SimplifyLibCalls.cpp Thu Nov 12 17:39:00 2015
@@ -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
More information about the llvm-commits
mailing list