[lld] r328733 - Merge nested "if"s. NFC.
Rui Ueyama via llvm-commits
llvm-commits at lists.llvm.org
Wed Mar 28 14:53:10 PDT 2018
Author: ruiu
Date: Wed Mar 28 14:53:10 2018
New Revision: 328733
URL: http://llvm.org/viewvc/llvm-project?rev=328733&view=rev
Log:
Merge nested "if"s. NFC.
Modified:
lld/trunk/ELF/Writer.cpp
Modified: lld/trunk/ELF/Writer.cpp
URL: http://llvm.org/viewvc/llvm-project/lld/trunk/ELF/Writer.cpp?rev=328733&r1=328732&r2=328733&view=diff
==============================================================================
--- lld/trunk/ELF/Writer.cpp (original)
+++ lld/trunk/ELF/Writer.cpp Wed Mar 28 14:53:10 2018
@@ -2097,12 +2097,10 @@ static uint16_t getELFType() {
}
static uint8_t getAbiVersion() {
- if (Config->EMachine == EM_MIPS) {
- // Increment the ABI version for non-PIC executable files.
- if (getELFType() == ET_EXEC &&
- (Config->EFlags & (EF_MIPS_PIC | EF_MIPS_CPIC)) == EF_MIPS_CPIC)
- return 1;
- }
+ // MIPS non-PIC executable gets ABI version 1.
+ if (Config->EMachine == EM_MIPS && getELFType() == ET_EXEC &&
+ (Config->EFlags & (EF_MIPS_PIC | EF_MIPS_CPIC)) == EF_MIPS_CPIC)
+ return 1;
return 0;
}
More information about the llvm-commits
mailing list