r250764 - [X86] Remove a few 'else' after 'return'
Craig Topper via cfe-commits
cfe-commits at lists.llvm.org
Mon Oct 19 17:00:18 PDT 2015
Author: ctopper
Date: Mon Oct 19 19:00:17 2015
New Revision: 250764
URL: http://llvm.org/viewvc/llvm-project?rev=250764&view=rev
Log:
[X86] Remove a few 'else' after 'return'
Modified:
cfe/trunk/lib/Basic/Targets.cpp
Modified: cfe/trunk/lib/Basic/Targets.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/Basic/Targets.cpp?rev=250764&r1=250763&r2=250764&view=diff
==============================================================================
--- cfe/trunk/lib/Basic/Targets.cpp (original)
+++ cfe/trunk/lib/Basic/Targets.cpp Mon Oct 19 19:00:17 2015
@@ -2386,9 +2386,9 @@ public:
StringRef getABI() const override {
if (getTriple().getArch() == llvm::Triple::x86_64 && SSELevel >= AVX512F)
return "avx512";
- else if (getTriple().getArch() == llvm::Triple::x86_64 && SSELevel >= AVX)
+ if (getTriple().getArch() == llvm::Triple::x86_64 && SSELevel >= AVX)
return "avx";
- else if (getTriple().getArch() == llvm::Triple::x86 &&
+ if (getTriple().getArch() == llvm::Triple::x86 &&
MMX3DNowLevel == NoMMX3DNow)
return "no-mmx";
return "";
@@ -3025,11 +3025,10 @@ bool X86TargetInfo::handleTargetFeatures
// LLVM doesn't have a separate switch for fpmath, so only accept it if it
// matches the selected sse level.
- if (FPMath == FP_SSE && SSELevel < SSE1) {
- Diags.Report(diag::err_target_unsupported_fpmath) << "sse";
- return false;
- } else if (FPMath == FP_387 && SSELevel >= SSE1) {
- Diags.Report(diag::err_target_unsupported_fpmath) << "387";
+ if ((FPMath == FP_SSE && SSELevel < SSE1) ||
+ (FPMath == FP_387 && SSELevel >= SSE1)) {
+ Diags.Report(diag::err_target_unsupported_fpmath) <<
+ (FPMath == FP_SSE ? "sse" : "387");
return false;
}
More information about the cfe-commits
mailing list