[llvm] r289331 - [mips] Eliminate else-after-return. NFC
Simon Atanasyan via llvm-commits
llvm-commits at lists.llvm.org
Sat Dec 10 09:30:09 PST 2016
Author: atanasyan
Date: Sat Dec 10 11:30:09 2016
New Revision: 289331
URL: http://llvm.org/viewvc/llvm-project?rev=289331&view=rev
Log:
[mips] Eliminate else-after-return. NFC
Modified:
llvm/trunk/lib/Target/Mips/MCTargetDesc/MipsABIInfo.cpp
Modified: llvm/trunk/lib/Target/Mips/MCTargetDesc/MipsABIInfo.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Target/Mips/MCTargetDesc/MipsABIInfo.cpp?rev=289331&r1=289330&r2=289331&view=diff
==============================================================================
--- llvm/trunk/lib/Target/Mips/MCTargetDesc/MipsABIInfo.cpp (original)
+++ llvm/trunk/lib/Target/Mips/MCTargetDesc/MipsABIInfo.cpp Sat Dec 10 11:30:09 2016
@@ -51,12 +51,11 @@ MipsABIInfo MipsABIInfo::computeTargetAB
const MCTargetOptions &Options) {
if (Options.getABIName().startswith("o32"))
return MipsABIInfo::O32();
- else if (Options.getABIName().startswith("n32"))
+ if (Options.getABIName().startswith("n32"))
return MipsABIInfo::N32();
- else if (Options.getABIName().startswith("n64"))
+ if (Options.getABIName().startswith("n64"))
return MipsABIInfo::N64();
- else if (!Options.getABIName().empty())
- llvm_unreachable("Unknown ABI option for MIPS");
+ assert(Options.getABIName().empty() && "Unknown ABI option for MIPS");
if (TT.getArch() == Triple::mips64 || TT.getArch() == Triple::mips64el)
return MipsABIInfo::N64();
More information about the llvm-commits
mailing list